class_docstr: Window
class_docstr_tok: ["Window"]
docstr: inputs:
  
  num1: scalar       ----------1------------>
  num2: queue        ----1----2----3---4----->
  timestamp: queue   --1000-2000-3000-4000--->
  
  params:
      time_range_sec: 3
      time_step_sec: 2
  
  time_window: [0s, 3s)  [2s, 5s) [4s, 6s)
  
  outputs:
  
  que1:
  num1: scalar   -----1----->
  num2: queue    --1-2-3-4--->
  sum1: queue    --2-3-1----->
  sum2: queue    --3-9-4----->
  
  que2:
  num1: scalar   ------1------>
  sum1: queue    --2-3-1----->
  sum2: queue    --3-9-4----->
docstr_tok: ["inputs",":","num1",":","scalar","--","--","--","--","--","1","--","--","--","--","--","--",">","num2",":","queue","--","--","1","--","--","2","--","--","3","--","-4","--","--","-",">","timestamp",":","queue","--","1000-2000-3000-4000","--","-",">","params",":","time_range_sec",":","3","time_step_sec",":","2","time_window",":","[","0s",",","3s",")","[","2s",",","5s",")","[","4s",",","6s",")","outputs",":","que1",":","num1",":","scalar","--","--","-1","--","--","-",">","num2",":","queue","--","1-2-3-4","--","-",">","sum1",":","queue","--","2-3-1","--","--","-",">","sum2",":","queue","--","3-9-4","--","--","-",">","que2",":","num1",":","scalar","--","--","--","1","--","--","--",">","sum1",":","queue","--","2-3-1","--","--","-",">","sum2",":","queue","--","3-9-4","--","--","-",">"]
code: def test_small(self):
      """
      inputs:
  
      num1: scalar       ----------1------------>
      num2: queue        ----1----2----3---4----->
      timestamp: queue   --1000-2000-3000-4000--->
  
      params:
          time_range_sec: 3
          time_step_sec: 2
  
      time_window: [0s, 3s)  [2s, 5s) [4s, 6s)
  
      outputs:
  
      que1:
      num1: scalar   -----1----->
      num2: queue    --1-2-3-4--->
      sum1: queue    --2-3-1----->
      sum2: queue    --3-9-4----->
  
      que2:
      num1: scalar   ------1------>
      sum1: queue    --2-3-1----->
      sum2: queue    --3-9-4----->
      """
  
      info = copy.deepcopy(self.node_info)
      info["iter_info"]["param"]["time_step_sec"] = 2
      exp_ret1 = [
          {"num1": 1, "num2": 1, "sum1": 2, "sum2": 3},
          {"num1": 1, "num2": 2, "sum1": 3, "sum2": 9},
          {"num1": 1, "num2": 3, "sum1": 1, "sum2": 4},
          {"num1": 1, "num2": 4, "sum1": Empty(), "sum2": Empty()},
      ]
  
      exp_ret2 = [
          {"num1": 1, "sum1": 2, "sum2": 3},
          {"num1": 1, "sum1": 3, "sum2": 9},
          {"num1": 1, "sum1": 1, "sum2": 4},
      ]
      self._test_function(info, exp_ret1, exp_ret2)
  
imports: import unittest
  import copy
  from concurrent.futures import ThreadPoolExecutor
  from towhee.runtime.node_repr import NodeRepr
  from towhee.runtime.nodes import create_node, NodeStatus
  from towhee.runtime.nodes._time_window import _TimeWindowBuffer
  from towhee.runtime.data_queue import DataQueue, ColumnType, Empty
  from towhee.runtime.operator_manager import OperatorPool
label_desc: Use image node_id 3 for calling the TestWindowNode obj's underlying member method code with example usage: obj.test_small() without return types