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","."]
docstr: Filters a list of potential transformaed texts based on
  ``self.constraints``
  
  :param transformed_texts: A list of candidate transformed
      ``AttackedText`` to filter.
  :param current_text: The current ``AttackedText`` on which the
      transformation was applied.
  :param original_text: The original ``AttackedText`` from which the
      attack started.
  :return: The list of filtered ``AttackedText`.
docstr_tok: ["Filters","a","list","of","potential","transformaed","texts","based","on","``","self.constraints","``",":","param","transformed_texts",":","A","list","of","candidate","transformed","``","AttackedText","``","to","filter",".",":","param","current_text",":","The","current","``","AttackedText","``","on","which","the","transformation","was","applied",".",":","param","original_text",":","The","original","``","AttackedText","``","from","which","the","attack","started",".",":","return",":","The","list","of","filtered","``","AttackedText","`","."]
code: def _filter_transformations_uncached(
      self, transformed_texts, current_text, original_text=None
  ):
      """
      Filters a list of potential transformaed texts based on
      ``self.constraints``
  
      :param transformed_texts: A list of candidate transformed
          ``AttackedText`` to filter.
      :param current_text: The current ``AttackedText`` on which the
          transformation was applied.
      :param original_text: The original ``AttackedText`` from which the
          attack started.
      :return: The list of filtered ``AttackedText`.
      """
      filtered_texts = transformed_texts[:]
      for C in self.constraints:
          if len(filtered_texts) == 0:
              break
          if C.compare_against_original:
              if not original_text:
                  raise ValueError(
                      f"Missing `original_text` argument when constraint "
                      f"{type(C)} is set to compare against `original_text`"
                  )
  
              filtered_texts = C.call_many(
                  filtered_texts, original_text
              )
          else:
              filtered_texts = C.call_many(filtered_texts, current_text)
      # Default to false for all original transformations.
      for original_transformed_text in transformed_texts:
          self.constraints_cache[
              (current_text, original_transformed_text)
          ] = False
      # Set unfiltered transformations to True in the cache.
      for filtered_text in filtered_texts:
          self.constraints_cache[(current_text, filtered_text)] = True
      return filtered_texts
  
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 6 for calling the Attack obj's underlying member method code with example usage: obj._filter_transformations_uncached(transformed_texts, current_text, original_text) and returns: filtered_texts