class_docstr: Test case of invalid pipe interface 
docstr: target: test time_window() API for invalid scenario
  method: 1. timestamp_col not declared        2. timestamp_col type invalid (not str)
          3. Size/step type invalid            4. Size/step value invalid
  expected: raise exception
docstr_tok: ["target",":","test","time_window","(",")","API","for","invalid","scenario","method",":","1.","timestamp_col","not","declared","2.","timestamp_col","type","invalid","(","not","str",")","3",".","Size\/step","type","invalid","4",".","Size\/step","value","invalid","expected",":","raise","exception"]
code: def test_data_collection_time_window_invalid(self):
      """
      target: test time_window() API for invalid scenario
      method: 1. timestamp_col not declared        2. timestamp_col type invalid (not str)
              3. Size/step type invalid            4. Size/step value invalid
      expected: raise exception
      """
      # 1. timestamp_col not declared
      try:
          towhee.pipe.input("d").flat_map(
              "d", ("n1", "t"), lambda x: ((a, c) for a, c in x)
          ).time_window("n1", "s1", "a", 3, 1, lambda x: x).output("s1")
      except Exception as e:
          assert "not declared" in str(e)
  
      # 2. timestamp_col type invalid (not str)
      try:
          towhee.pipe.input("d").flat_map(
              "d", ("n1", "t"), lambda x: ((a, c) for a, c in x)
          ).time_window("n1", "s1", 1000, 3, 1, lambda x: x).output(
              "s1"
          )
      except Exception as e:
          assert "not iterable" in str(e)
  
      # 3. Size/step type invalid
      size_type = ["B", [23], {0}]
      for size in size_type:
          try:
              towhee.pipe.input("d").flat_map(
                  "d", ("n1", "t"), lambda x: ((a, c) for a, c in x)
              ).time_window(
                  "n1", "s1", "t", size, 1, lambda x: x
              ).output(
                  "s1"
              )
          except Exception as e:
              assert "not int" in str(e)
      step_type = ["B", [23], {0}]
      for step in step_type:
          try:
              towhee.pipe.input("d").flat_map(
                  "d", ("n1", "t"), lambda x: ((a, c) for a, c in x)
              ).time_window(
                  "n1", "s1", "t", 3, step, lambda x: x
              ).output(
                  "s1"
              )
          except Exception as e:
              assert "not int" in str(e)
  
      # 4. Size/step value invalid
      try:
          towhee.pipe.input("d").flat_map(
              "d", ("n1", "t"), lambda x: ((a, c) for a, c in x)
          ).time_window("n1", "s1", "t", -3, -1, lambda x: x).output(
              "s1"
          )
      except Exception as e:
          assert "<=0" 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 6 for calling the TestPipeAPIsInvalid obj's underlying member method code with example usage: obj.test_data_collection_time_window_invalid() and returns: True