code: def test_generate(art_warning, fix_get_cifar10_subset):
      try:
          (x_train, y_train, x_test, y_test) = fix_get_cifar10_subset
  
          classifier = get_cifar10_image_classifier_pt(
              from_logits=False, load_init=True
          )
          attack = CompositeAdversarialAttackPyTorch(classifier)
  
          x_train_adv = attack.generate(x=x_train, y=y_train)
          x_test_adv = attack.generate(x=x_test, y=y_test)
  
          assert x_train.shape == x_train_adv.shape
          assert np.min(x_train_adv) >= 0.0
          assert np.max(x_train_adv) <= 1.0
          assert x_test.shape == x_test_adv.shape
          assert np.min(x_test_adv) >= 0.0
          assert np.max(x_test_adv) <= 1.0
  
      except ARTTestException as e:
          art_warning(e)
  
file_path: adversarial-robustness-toolbox/tests/attacks/evasion/test_composite_adversarial_attack.py
imports: import logging
  import numpy
  import pytest
  from art.attacks.evasion import CompositeAdversarialAttackPyTorch
  from art.estimators.estimator import BaseEstimator, LossGradientsMixin
  from art.estimators.classification.classifier import ClassifierMixin
  from tests.attacks.utils import backend_test_classifier_type_check_fail
  from tests.utils import ARTTestException, get_cifar10_image_classifier_pt
label_desc: Use image node_id 2 for calling a global function with example usage: test_generate(art_warning, fix_get_cifar10_subset) without return types