parameters: (stream, filters, lexer=None)
return_statement: return stream
docstring: Use this method to apply an iterable of filters to
      a stream. If lexer is given it's forwarded to the
      filter, otherwise the filter receives `None`.
docstring_summary: Use this method to apply an iterable of filters to
      a stream. If lexer is given it's forwarded to the
      filter, otherwise the filter receives `None`.
docstring_tokens: Use this method to apply an iterable of filters to a stream . If lexer is given it s forwarded to the filter otherwise the filter receives None .
function: def apply_filters(stream, filters, lexer=None):
      """
      Use this method to apply an iterable of filters to
      a stream. If lexer is given it's forwarded to the
      filter, otherwise the filter receives `None`.
      """
      def _apply(filter_, stream):
          for token in filter_.filter(lexer, stream):
              yield token
      for filter_ in filters:
          stream = _apply(filter_, stream)
      return stream
function_tokens: def apply_filters ( stream , filters , lexer = None ) : def _apply ( filter_ , stream ) : for token in filter_ . filter ( lexer , stream ) : yield token for filter_ in filters : stream = _apply ( filter_ , stream ) return stream