    def test_data_collection_time_window(self):
        """
        target: test time_window() API for pipeline
        method: Get the input data, apply it to a function over time_windows of given size,then output.
        expected: output successfully
        """
        p = towhee.pipe.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', 3, 3, lambda x, y: (sum(x), sum(y)))\
                       .output('s1', 's2')
        res = p([(i, i+1, i * 1000) for i in range(11) if i < 3 or i > 7])
        assert res.get() == [3, 6]
        assert res.get() == [8, 9]
        assert res.get() == [19, 21]

        return True
target: test time_window() API for pipeline
method: Get the input data, apply it to a function over time_windows of given size,then output.
expected: output successfully
tests/testcases/test_data_collection.py