class_docstr: Test case of valid data collection interface 
docstr: target: test flatten() API for DataCollection
  method: create an iter data collection and flatten it
  expected: return flatten successfully
docstr_tok: ["target",":","test","flatten","(",")","API","for","DataCollection","method",":","create","an","iter","data","collection","and","flatten","it","expected",":","return","flatten","successfully"]
code: 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
  
imports: import sys
  import towhee
  import time
  import threading
  import numpy
  import random
  import operator
  from common import common_func
  from towhee import pipe, ops
label_desc: Use image node_id 25 for calling the TestOldDataCollectionAPIsValid obj's underlying member method code with example usage: obj.test_data_collection_flatten_inter() and returns: True