class_docstr: An abstract class that represents constraints on adversial text
  examples. Constraints evaluate whether transformations from a
  ``AttackedText`` to another ``AttackedText`` meet certain conditions.
  
  Args:
      compare_against_original (bool): If `True`, the reference text should be the original text under attack.
          If `False`, the reference text is the most recent text from which the transformed text was generated.
          All constraints must have this attribute.
class_docstr_tok: ["An","abstract","class","that","represents","constraints","on","adversial","text","examples",".","Constraints","evaluate","whether","transformations","from","a","``","AttackedText","``","to","another","``","AttackedText","``","meet","certain","conditions",".","Args",":","compare_against_original","(","bool",")",":","If","`","True","`",",","the","reference","text","should","be","the","original","text","under","attack",".","If","`","False","`",",","the","reference","text","is","the","most","recent","text","from","which","the","transformed","text","was","generated",".","All","constraints","must","have","this","attribute","."]
docstr: Returns True if the constraint is fulfilled, False otherwise. First
  checks compatibility with latest ``Transformation``, then calls
  ``_check_constraint``
  
  Args:
      transformed_text (AttackedText): The candidate transformed ``AttackedText``.
      reference_text (AttackedText): The ``AttackedText`` to compare against.
docstr_tok: ["Returns","True","if","the","constraint","is","fulfilled",",","False","otherwise",".","First","checks","compatibility","with","latest","``","Transformation","``",",","then","calls","``","_check_constraint","``","Args",":","transformed_text","(","AttackedText",")",":","The","candidate","transformed","``","AttackedText","``",".","reference_text","(","AttackedText",")",":","The","``","AttackedText","``","to","compare","against","."]
code: def __call__(self, transformed_text, reference_text):
      """Returns True if the constraint is fulfilled, False otherwise. First
      checks compatibility with latest ``Transformation``, then calls
      ``_check_constraint``
  
      Args:
          transformed_text (AttackedText): The candidate transformed ``AttackedText``.
          reference_text (AttackedText): The ``AttackedText`` to compare against.
      """
      if not isinstance(
          transformed_text, textattack.shared.AttackedText
      ):
          raise TypeError(
              "transformed_text must be of type AttackedText"
          )
      if not isinstance(reference_text, textattack.shared.AttackedText):
          raise TypeError("reference_text must be of type AttackedText")
  
      try:
          if not self.check_compatibility(
              transformed_text.attack_attrs["last_transformation"]
          ):
              return True
      except KeyError:
          raise KeyError(
              "`transformed_text` must have `last_transformation` attack_attr to apply constraint."
          )
      return self._check_constraint(transformed_text, reference_text)
  
file_path: TextAttack/textattack/constraints/constraint.py
imports: from abc import ABC, abstractmethod
  import textattack
  from textattack.shared.utils import ReprMixin
label_desc: Use image node_id 4 for calling the Constraint obj's underlying member method code with example usage: obj.__call__(transformed_text, reference_text) and returns: self, True