code: def attack_selection(attack_string):
    
  
    # 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
docs: Selects the Attack Class using string input.
    :param attack_string: adversarial attack name in string format
    :return: attack class defined in cleverhans.attacks_eager