    def test_data_collection_flat_map_invalid(self):
        """
        target: test flat_map() API for invalid scenario
        method: Func not valid
        expected: raise exception
        """
        try:
            p = towhee.pipe.input('a').flat_map('a', 'b', lambda x: x + y).output('b')
            p(10).get()
        except Exception as e:
            assert "not" in str(e)
        return True
target: test flat_map() API for invalid scenario
method: Func not valid
expected: raise exception
tests/testcases/test_data_collection.py