class_docstr: Test case of valid data collection interface 
docstr: target: test batch() API for pipeline
  method: input a list to Batch run the callable pipeline
  expected: output successfully
docstr_tok: ["target",":","test","batch","(",")","API","for","pipeline","method",":","input","a","list","to","Batch","run","the","callable","pipeline","expected",":","output","successfully"]
code: 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]]
  
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 10 for calling the TestDataCollectionAPIsValid obj's underlying member method code with example usage: obj.test_data_collection_batch() and returns: unknown,  unknown