    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])
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)]
tests/unittests/runtime/test_user_pipeline.py