class_docstr: An attack generates adversarial examples on text.
  
  This is an abstract class that contains main helper functionality for
  attacks. An attack is comprised of a search method, goal function,
  a transformation, and a set of one or more linguistic constraints that
  successful examples must meet.
class_docstr_tok: ["An","attack","generates","adversarial","examples","on","text",".","This","is","an","abstract","class","that","contains","main","helper","functionality","for","attacks",".","An","attack","is","comprised","of","a","search","method",",","goal","function",",","a","transformation",",","and","a","set","of","one","or","more","linguistic","constraints","that","successful","examples","must","meet","."]
code: def __repr__(self):
      constraints = (
          self.constraints + self.pre_transformation_constraints
      )
      if len(constraints):
          constraints_str = "_".join([str(c) for c in constraints])
      else:
          constraints_str = "None"
      main_str = "(Search_%s)_(Goal_%s)_(Trans_%s)_(Cons_%s)" % (
          self.search_method,
          self.goal_function,
          self.transformation,
          constraints_str,
      )
      return main_str
  
imports: import lru
  from collections import deque
  from ...common import logger
  from textattack.attack_results import FailedAttackResult, MaximizedAttackResult, SuccessfulAttackResult
  from textattack.goal_function_results import GoalFunctionResultStatus
  from textattack.shared import AttackedText, utils
  from textattack.transformations import CompositeTransformation
label_desc: Use image node_id 11 for calling the Attack obj's underlying member method code with example usage: obj.__repr__() and returns: main_str