    def test_data_collection_flatten_inter(self):
        """
        target: test flatten() API for DataCollection
        method: create an iter data collection and flatten it
        expected: return flatten successfully
        """
        data_size = 6
        data = iter(range(data_size))
        dc = towhee.dc(data)
        size = 3
        res = dc.batch(size)
        result = res.flatten().to_list()

        assert len(result) == data_size

        return True
target: test flatten() API for DataCollection
method: create an iter data collection and flatten it
expected: return flatten successfully
tests/testcases/test_data_collection.py