code: def attack_selection(attack_string):
      """
      Selects the Attack Class using string input.
      :param attack_string: adversarial attack name in string format
      :return: attack class defined in cleverhans.attacks_eager
      """
  
      # List of Implemented attacks
      attacks_list = AVAILABLE_ATTACKS.keys()
  
      # Checking for  requested attack in list of available attacks.
      if attack_string is None:
          raise AttributeError(
              "Attack type is not specified, "
              "list of available attacks\t".join(attacks_list)
          )
      if attack_string not in attacks_list:
          raise AttributeError(
              "Attack not available "
              "list of available attacks\t".join(attacks_list)
          )
      # Mapping attack from string to class.
      attack_class = AVAILABLE_ATTACKS[attack_string]
      return attack_class
  
file_path: cleverhans/cleverhans_v3.1.0/cleverhans_tutorials/mnist_tutorial_tfe.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import logging
  import numpy
  import tensorflow
  from cleverhans.compat import flags
  from cleverhans.utils import AccuracyReport
  from cleverhans.utils_tfe import train, model_eval
  from cleverhans.attacks_tfe import BasicIterativeMethod
  from cleverhans.attacks_tfe import FastGradientMethod
  from cleverhans.dataset import MNIST
  from cleverhans.utils import set_log_level
  from cleverhans_tutorials.tutorial_models_tfe import ModelBasicCNNTFE
label_desc: Use image node_id 1 for calling a global function with example usage: attack_selection(attack_string) and returns: attack_class