    def test_data_collection_map(self):
        """
        target: test map() API for pipeline
        method: Get the input data, apply it to a function, then output.
        expected: output successfully
        """
        # run with lambda
        p = towhee.pipe.input('a', 'b').map(('a', 'b'), 'c', lambda x, y: x + y).output('c')
        assert p(30, 52).get() == [82]

        # run with callable
        def func(x, y):
            return x + y, x - y
        q = towhee.pipe.input('a', 'b').map(('a', 'b'), ('c', 'd'), func).output('c', 'd')
        assert q(100, 50).get() == [150, 50]
        def func1(x):
            y = 0
        q = towhee.pipe.input('a').map('a', 'b', func1).output('b')
        assert q(100).get() == None

        # run with the operator in hub
        t = towhee.pipe.input('path').map('path', 'img', ops.towhee.image_decode()).output('img')
        res = t('https://github.com/towhee-io/towhee/raw/main/towhee_logo.png').get()
        assert len(res) == 1

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