class_docstr: Unit test for PerformanceProfiler.
class_docstr_tok: ["Unit","test","for","PerformanceProfiler","."]
code: def test_tracer_flat_map(self):
      pipe0 = (
          pipe.input("d")
          .flat_map("d", ("n1", "n2"), lambda x: ((a, b) for a, b in x))
          .output("n1", "n2")
      )
      data = [(i, i + 1) for i in range(10)]
      v = pipe0.debug(data, profiler=True)
  
      pp = v.profiler
      self.assertEqual(len(pp.pipes_profiler), 1)
      self.assertEqual(len(pp.node_report), 3)
      pp.show()
  
imports: import json
  import unittest
  from pathlib import Path
  from towhee import pipe
  from towhee import ops, register
  from towhee.runtime.time_profiler import TimeProfiler
  from towhee.tools.profilers import PerformanceProfiler
label_desc: Use image node_id 3 for calling the TestPerformanceProfiler obj's underlying member method code with example usage: obj.test_tracer_flat_map() without return types