class_docstr: Result of an Attack run on a single (output, text_input) pair.
  
  Args:
      original_result (:class:`~textattack.goal_function_results.GoalFunctionResult`):
          Result of the goal function applied to the original text
      perturbed_result (:class:`~textattack.goal_function_results.GoalFunctionResult`):
          Result of the goal function applied to the perturbed text. May or may not have been successful.
class_docstr_tok: ["Result","of","an","Attack","run","on","a","single","(","output",",","text_input",")","pair",".","Args",":","original_result","(",":","class",":","`","~textattack.goal_function_results.GoalFunctionResult","`",")",":","Result","of","the","goal","function","applied","to","the","original","text","perturbed_result","(",":","class",":","`","~textattack.goal_function_results.GoalFunctionResult","`",")",":","Result","of","the","goal","function","applied","to","the","perturbed","text",".","May","or","may","not","have","been","successful","."]
code: def __init__(self, original_result, perturbed_result):
      if original_result is None:
          raise ValueError("Attack original result cannot be None")
      elif not isinstance(original_result, GoalFunctionResult):
          raise TypeError(
              f"Invalid original goal function result: {original_result}"
          )
      if perturbed_result is None:
          raise ValueError("Attack perturbed result cannot be None")
      elif not isinstance(perturbed_result, GoalFunctionResult):
          raise TypeError(
              f"Invalid perturbed goal function result: {perturbed_result}"
          )
  
      self.original_result = original_result
      self.perturbed_result = perturbed_result
      self.num_queries = perturbed_result.num_queries
  
      # We don't want the AttackedText attributes sticking around clogging up
      # space on our devices. Delete them here, if they're still present,
      # because we won't need them anymore anyway.
      self.original_result.attacked_text.free_memory()
      self.perturbed_result.attacked_text.free_memory()
  
file_path: TextAttack/textattack/attack_results/attack_result.py
imports: from abc import ABC
  from langdetect import detect
  from textattack.goal_function_results import GoalFunctionResult
  from textattack.shared import utils
label_desc: Use image node_id 1 to create a new AttackResult object from inherited base classes: ABC with example: obj = AttackResult(original_result, perturbed_result)