code: def simplefilter(f):
      """
      Decorator that converts a function into a filter::
  
          @simplefilter
          def lowercase(self, lexer, stream, options):
              for ttype, value in stream:
                  yield ttype, value.lower()
      """
      return type(
          f.__name__,
          (FunctionFilter,),
          {
              "__module__": getattr(f, "__module__"),
              "__doc__": f.__doc__,
              "function": f,
          },
      )
  
file_path: catboost/contrib/python/Pygments/py2/pygments/filter.py
label_desc: Use image node_id 2 for calling a global function with example usage: simplefilter(f) and returns: type