code: def get_adv_trainer_awppgd(framework, image_dl_estimator):
      def _get_adv_trainer_awppgd():
          if framework == "keras":
              trainer = None
          if framework in ["tensorflow", "tensorflow2v1"]:
              trainer = None
          if framework == "pytorch":
              classifier, _ = image_dl_estimator(from_logits=True)
              proxy_classifier, _ = image_dl_estimator(from_logits=True)
              attack = ProjectedGradientDescent(
                  classifier,
                  norm=np.inf,
                  eps=0.2,
                  eps_step=0.02,
                  max_iter=20,
                  targeted=False,
                  num_random_init=1,
                  batch_size=128,
                  verbose=False,
              )
              trainer = AdversarialTrainerAWPPyTorch(
                  classifier,
                  proxy_classifier,
                  attack,
                  mode="PGD",
                  gamma=0.01,
                  beta=6.0,
                  warmup=0,
              )
          if framework == "scikitlearn":
              trainer = None
  
          return trainer
  
      return _get_adv_trainer_awppgd
  
file_path: adversarial-robustness-toolbox/tests/defences/trainer/test_adversarial_trainer_awp_pytorch.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import pytest
  import logging
  import numpy
  from art.defences.trainer import AdversarialTrainerAWPPyTorch
  from art.attacks.evasion import ProjectedGradientDescent
label_desc: Use image node_id 1 for calling a global function with example usage: get_adv_trainer_awppgd(framework, image_dl_estimator) and returns: _get_adv_trainer_awppgd, trainer