    def test_data_collection_batch(self):
        """
        target: test batch() API for pipeline
        method: input a list to Batch run the callable pipeline
        expected: output successfully
        """
        p = pipe.input('a').map('a', 'b', lambda x: x + 1).output('b')
        res = p.batch([1, 2, 3])
        assert [r.get() for r in res] == [[2], [3], [4]]

        def func(x, y):
            return x + y, x - y
        p = pipe.input('a', 'b').map(('a', 'b'), ('c', 'd'), func).output('c', 'd')
        res = p.batch([[1, 1], [100, 100]])
        assert [r.get() for r in res] == [[2, 0], [200, 0]]

        # input 'tuple'
        p = pipe.input('a').map('a', 'b', lambda x: x + 1).output('b')
        res = p.batch((2, 3))
        assert [r.get() for r in res] == [[3], [4]]
target: test batch() API for pipeline
method: input a list to Batch run the callable pipeline
expected: output successfully
tests/testcases/test_data_collection.py