class_docstr: Pipeline is a tool to create data transformation chains.
  
  Args:
      dag (`dict`): The dag for the pipeline.
      clo_node (`str`): The close node in the pipeline dag, defaults to '_input'.
docstr: Filter the input columns based on the selected filter_columns.
  
  Args:
      input_schema (tuple): The input column/s before filter.
      output_schema (tuple): The output columns after filter, so the length of input_schema equals to the output_schema.
      filter_columns (str | tuple): Which columns to filter on.
      fn (Operation | lambda | callable): The action to perform on the filter_colums.
      config (dict, optional): Config for the filter. Defaults to None.
  
  Returns:
      Pipeline: Pipeline with filter action added.
  
  Examples:
      >>> from towhee import pipe
      >>> def filter_func(num):
      ...     return num > 10
      >>> p = (pipe.input('a', 'c')
      ...         .filter('c', 'd', 'a', filter_func)
      ...         .output('d'))
      >>> p(1, 12).get()
      None
      >>> p(11, 12).get()
      [12]
docstr_tok: ["Filter","the","input","columns","based","on","the","selected","filter_columns",".","Args",":","input_schema","(","tuple",")",":","The","input","column\/s","before","filter",".","output_schema","(","tuple",")",":","The","output","columns","after","filter",",","so","the","length","of","input_schema","equals","to","the","output_schema",".","filter_columns","(","str","|","tuple",")",":","Which","columns","to","filter","on",".","fn","(","Operation","|","lambda","|","callable",")",":","The","action","to","perform","on","the","filter_colums",".","config","(","dict",",","optional",")",":","Config","for","the","filter",".","Defaults","to","None",".","Returns",":","Pipeline",":","Pipeline","with","filter","action","added",".","Examples",":",">",">",">","from","towhee","import","pipe",">",">",">","def","filter_func","(","num",")",":","...","return","num",">","10",">",">",">","p","=","(","pipe.input","(","'","a","'",",","'","c","'",")","...",".filter","(","'","c","'",",","'d","'",",","'","a","'",",","filter_func",")","...",".output","(","'d","'",")",")",">",">",">","p","(","1",",","12",")",".get","(",")","None",">",">",">","p","(","11",",","12",")",".get","(",")","[","12","]"]
code: def filter(
      self, input_schema, output_schema, filter_columns, fn, config=None
  ) -> "Pipeline":
      """
      Filter the input columns based on the selected filter_columns.
  
      Args:
          input_schema (tuple): The input column/s before filter.
          output_schema (tuple): The output columns after filter, so the length of input_schema equals to the output_schema.
          filter_columns (str | tuple): Which columns to filter on.
          fn (Operation | lambda | callable): The action to perform on the filter_colums.
          config (dict, optional): Config for the filter. Defaults to None.
  
      Returns:
          Pipeline: Pipeline with filter action added.
  
      Examples:
          >>> from towhee import pipe
          >>> def filter_func(num):
          ...     return num > 10
          >>> p = (pipe.input('a', 'c')
          ...         .filter('c', 'd', 'a', filter_func)
          ...         .output('d'))
          >>> p(1, 12).get()
          None
          >>> p(11, 12).get()
          [12]
      """
      output_schema = self._check_schema(output_schema)
      input_schema = self._check_schema(input_schema)
      filter_columns = self._check_schema(filter_columns)
  
      uid = uuid.uuid4().hex
      fn_action = self._to_action(fn)
      dag_dict = deepcopy(self._dag)
      dag_dict[uid] = {
          "inputs": input_schema,
          "outputs": output_schema,
          "op_info": fn_action.serialize(),
          "iter_info": {
              "type": FilterConst.name,
              "param": {FilterConst.param.filter_by: filter_columns},
          },
          "config": config,
          "next_nodes": [],
      }
      dag_dict[self._clo_node]["next_nodes"].append(uid)
      return Pipeline(dag_dict, uid)
  
imports: import uuid
  from copy import deepcopy
  from towhee.runtime.check_utils import TupleForm
  from towhee.runtime.operator_manager import OperatorAction
  from towhee.runtime.factory import _OperatorWrapper
  from towhee.runtime.runtime_pipeline import RuntimePipeline
  from towhee.runtime.constants import MapConst, WindowAllConst, WindowConst, ReduceConst, FilterConst, TimeWindowConst, FlatMapConst, ConcatConst, InputConst, OutputConst, OPName
label_desc: Use image node_id 8 for calling the Pipeline obj's underlying member method code with example usage: obj.filter(input_schema, output_schema, filter_columns, fn, config) and returns: Pipeline