class_docstr: Test case of invalid pipe interface 
docstr: target: test flat_map() API for invalid scenario
  method: Func not valid
  expected: raise exception
docstr_tok: ["target",":","test","flat_map","(",")","API","for","invalid","scenario","method",":","Func","not","valid","expected",":","raise","exception"]
code: 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
  
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 TestPipeAPIsInvalid obj's underlying member method code with example usage: obj.test_data_collection_flat_map_invalid() and returns: True