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: One to many map action.
  
  The operator might have a variable amount of outputs, each output is treated as a new row.
  
  Args:
      input_schema (tuple): The input column/s of fn.
      output_schema (tuple): The output column/s of fn.
      fn (Operation | lambda | callable): The action to perform on the input_schema.
      config (dict, optional): Config for the flat_map. Defaults to None.
  
  Returns:
      Pipeline: Pipeline with flat_map action added.
  
  Examples:
      >>> from towhee import pipe
      >>> p = (pipe.input('a')
      ...         .flat_map('a', 'b', lambda x: [y for y in x])
      ...         .output('b'))
      >>> res = p([1, 2, 3])
      >>> res.get()
      [1]
      >>> res.get()
      [2]
      >>> res.get()
      [3]
docstr_tok: ["One","to","many","map","action",".","The","operator","might","have","a","variable","amount","of","outputs",",","each","output","is","treated","as","a","new","row",".","Args",":","input_schema","(","tuple",")",":","The","input","column\/s","of","fn",".","output_schema","(","tuple",")",":","The","output","column\/s","of","fn",".","fn","(","Operation","|","lambda","|","callable",")",":","The","action","to","perform","on","the","input_schema",".","config","(","dict",",","optional",")",":","Config","for","the","flat_map",".","Defaults","to","None",".","Returns",":","Pipeline",":","Pipeline","with","flat_map","action","added",".","Examples",":",">",">",">","from","towhee","import","pipe",">",">",">","p","=","(","pipe.input","(","'","a","'",")","...",".flat_map","(","'","a","'",",","'","b","'",",","lambda","x",":","[","y","for","y","in","x","]",")","...",".output","(","'","b","'",")",")",">",">",">","res","=","p","(","[","1",",","2",",","3","]",")",">",">",">","res.get","(",")","[","1","]",">",">",">","res.get","(",")","[","2","]",">",">",">","res.get","(",")","[","3","]"]
code: def flat_map(
      self, input_schema, output_schema, fn, config=None
  ) -> "Pipeline":
      """
      One to many map action.
  
      The operator might have a variable amount of outputs, each output is treated as a new row.
  
      Args:
          input_schema (tuple): The input column/s of fn.
          output_schema (tuple): The output column/s of fn.
          fn (Operation | lambda | callable): The action to perform on the input_schema.
          config (dict, optional): Config for the flat_map. Defaults to None.
  
      Returns:
          Pipeline: Pipeline with flat_map action added.
  
      Examples:
          >>> from towhee import pipe
          >>> p = (pipe.input('a')
          ...         .flat_map('a', 'b', lambda x: [y for y in x])
          ...         .output('b'))
          >>> res = p([1, 2, 3])
          >>> res.get()
          [1]
          >>> res.get()
          [2]
          >>> res.get()
          [3]
      """
      output_schema = self._check_schema(output_schema)
      input_schema = self._check_schema(input_schema)
  
      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": FlatMapConst.name, "param": None},
          "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 7 for calling the Pipeline obj's underlying member method code with example usage: obj.flat_map(input_schema, output_schema, fn, config) and returns: Pipeline