def test_large_append(art_warning, fix_get_synthetic_data, fix_make_dummy_model):
    """
    Testing with very large perturbation budgets
    """
    # Fourth check append large perturbation
    try:
        param_dic = {"maxlen": 2**20, "input_dim": 257, "embedding_size": 8}
        # First check: with no perturbation the malware of sufficient size, and benign files, should be unperturbed
        l0_budget = int(((2**20) * 0.2))
        attack = MalwareGDTensorFlow(
            classifier=fix_make_dummy_model[0],
            embedding_weights=fix_make_dummy_model[1],
            l_0=l0_budget,
            param_dic=param_dic,
        )

        x = np.copy(fix_get_synthetic_data[0])
        y = np.copy(fix_get_synthetic_data[1])
        size_of_files = np.copy(fix_get_synthetic_data[2])

        adv_x, adv_y, adv_sizes = attack.pull_out_valid_samples(x, y, sample_sizes=size_of_files)
        # We should only have one datapoint that can support an append perturbation of this size
        assert len(adv_x) == 1

        adv_x = attack.generate(adv_x, adv_y, adv_sizes)

        j = 0
        for i, size in enumerate(fix_get_synthetic_data[2]):
            if i == 0:
                assert np.array_equal(adv_x[j, :size], fix_get_synthetic_data[0][i, :size])
                assert not np.array_equal(
                    adv_x[j, size : size + l0_budget], fix_get_synthetic_data[0][i, size : size + l0_budget]
                )
                assert np.array_equal(adv_x[j, size + l0_budget :], fix_get_synthetic_data[0][i, size + l0_budget :])
            else:
                assert np.array_equal(x[i], fix_get_synthetic_data[0][i])
    except ARTTestException as e:
        art_warning(e)

    Testing with very large perturbation budgets
    
tests/attacks/evasion/test_pe_malware_attack.py