class_docstr: Interleaves the results of two or more filters (or filter chains).
  
  NOTE: because it needs to create copies of each token for each sub-filter,
  this filter is quite slow.
  
  >>> target = "ALFA BRAVO CHARLIE"
  >>> # In one branch, we'll lower-case the tokens
  >>> f1 = LowercaseFilter()
  >>> # In the other branch, we'll reverse the tokens
  >>> f2 = ReverseTextFilter()
  >>> ana = RegexTokenizer(r"\S+") | TeeFilter(f1, f2)
  >>> [token.text for token in ana(target)]
  ["alfa", "AFLA", "bravo", "OVARB", "charlie", "EILRAHC"]
  
  To combine the incoming token stream with the output of a filter chain, use
  ``TeeFilter`` and make one of the filters a :class:`PassFilter`.
  
  >>> f1 = PassFilter()
  >>> f2 = BiWordFilter()
  >>> ana = RegexTokenizer(r"\S+") | TeeFilter(f1, f2) | LowercaseFilter()
  >>> [token.text for token in ana(target)]
  ["alfa", "alfa-bravo", "bravo", "bravo-charlie", "charlie"]
class_docstr_tok: ["Interleaves","the","results","of","two","or","more","filters","(","or","filter","chains",")",".","NOTE",":","because","it","needs","to","create","copies","of","each","token","for","each","sub-filter",",","this","filter","is","quite","slow",".",">",">",">","target","=","``","ALFA","BRAVO","CHARLIE","''",">",">",">","#","In","one","branch",",","we","'ll","lower-case","the","tokens",">",">",">","f1","=","LowercaseFilter","(",")",">",">",">","#","In","the","other","branch",",","we","'ll","reverse","the","tokens",">",">",">","f2","=","ReverseTextFilter","(",")",">",">",">","ana","=","RegexTokenizer","(","r","''","\\S+","''",")","|","TeeFilter","(","f1",",","f2",")",">",">",">","[","token.text","for","token","in","ana","(","target",")","]","[","``","alfa","''",",","``","AFLA","''",",","``","bravo","''",",","``","OVARB","''",",","``","charlie","''",",","``","EILRAHC","''","]","To","combine","the","incoming","token","stream","with","the","output","of","a","filter","chain",",","use","``","TeeFilter","``","and","make","one","of","the","filters","a",":","class",":","`","PassFilter","`",".",">",">",">","f1","=","PassFilter","(",")",">",">",">","f2","=","BiWordFilter","(",")",">",">",">","ana","=","RegexTokenizer","(","r","''","\\S+","''",")","|","TeeFilter","(","f1",",","f2",")","|","LowercaseFilter","(",")",">",">",">","[","token.text","for","token","in","ana","(","target",")","]","[","``","alfa","''",",","``","alfa-bravo","''",",","``","bravo","''",",","``","bravo-charlie","''",",","``","charlie","''","]"]
code: def __call__(self, tokens):
      from itertools import tee
  
      count = len(self.filters)
      # Tee the token iterator and wrap each teed iterator with the
      # corresponding filter
      gens = [
          filter(t.copy() for t in gen)
          for filter, gen in zip(self.filters, tee(tokens, count))
      ]
      # Keep a count of the number of running iterators
      running = count
      while running:
          for i, gen in enumerate(gens):
              if gen is not None:
                  try:
                      yield next(gen)
                  except StopIteration:
                      gens[i] = None
                      running -= 1
  
imports: from itertools import chain
  from whoosh.compat import next
  from whoosh.analysis.acore import Composable
  from whoosh.util.text import rcompile
label_desc: Use image node_id 3 for calling the TeeFilter obj's underlying member method code with example usage: obj.__call__(tokens) without return types