class_docstr: Test Pipeline
class_docstr_tok: ["Test","Pipeline"]
docstr: data: [(0, 1, 0), (1, 2, 1000), (2, 3, 2000), (92, 93, 92000), (93, 94, 93000), (94, 95, 94000), (95, 96, 95000), (96, 97, 96000),
                                                (97, 98, 97000), (98, 99, 98000), (99, 100, 99000)]
  window_data:
  [(0, 1, 0), (1, 2, 1000), (2, 3, 2000),
  (92, 93, 92000), (93, 94, 93000), (94, 95, 94000), (95, 96, 95000), (96, 97, 96000), (97, 98, 97000), (98, 99, 98000), (99, 100, 99000),
  (95, 96, 95000), (96, 97, 96000), (97, 98, 97000), (98, 99, 98000), (99, 100, 99000)]
code: def test_time_window(self):
      """
      data: [(0, 1, 0), (1, 2, 1000), (2, 3, 2000), (92, 93, 92000), (93, 94, 93000), (94, 95, 94000), (95, 96, 95000), (96, 97, 96000),
                                                    (97, 98, 97000), (98, 99, 98000), (99, 100, 99000)]
      window_data:
      [(0, 1, 0), (1, 2, 1000), (2, 3, 2000),
      (92, 93, 92000), (93, 94, 93000), (94, 95, 94000), (95, 96, 95000), (96, 97, 96000), (97, 98, 97000), (98, 99, 98000), (99, 100, 99000),
      (95, 96, 95000), (96, 97, 96000), (97, 98, 97000), (98, 99, 98000), (99, 100, 99000)]
      """
      pipe = (
          Pipeline.input("d")
          .flat_map(
              "d",
              ("n1", "n2", "t"),
              lambda x: ((a, b, c) for a, b, c in x),
          )
          .time_window(
              ("n1", "n2"), ("s1", "s2"), "t", 10, 5, ops.local.sum2()
          )
          .output("s1", "s2")
      )
      data = [
          (i, i + 1, i * 1000) for i in range(100) if i < 3 or i > 91
      ]
      res = pipe(data)
      self.assertEqual(res.get(), [3, 6])
      self.assertEqual(res.get(), [764, 772])
      self.assertEqual(res.get(), [485, 490])
  
imports: import unittest
  from towhee.operator.nop import NOPNodeOperator
  from towhee.operator import PyOperator
  from towhee.runtime.pipeline import Pipeline
  from towhee.runtime.data_queue import Empty
  from towhee.runtime import ops, register
  from towhee.runtime.runtime_pipeline import RuntimePipeline
label_desc: Use image node_id 17 for calling the TestPipeline obj's underlying member method code with example usage: obj.test_time_window() without return types