class_docstr: Test case of valid data collection interface 
docstr: target: test map() API for pipeline
  method: Get the input data, apply it to a function, then output.
  expected: output successfully
docstr_tok: ["target",":","test","map","(",")","API","for","pipeline","method",":","Get","the","input","data",",","apply","it","to","a","function",",","then","output",".","expected",":","output","successfully"]
code: 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
  
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 3 for calling the TestDataCollectionAPIsValid obj's underlying member method code with example usage: obj.test_data_collection_map() and returns: True, unknown,  unknown