class_docstr: Test case of valid data collection interface 
docstr: target: test window_all() API for pipeline
  method: Get the input data, apply it to a function over a window of all elements,then output.
  expected: output successfully
docstr_tok: ["target",":","test","window_all","(",")","API","for","pipeline","method",":","Get","the","input","data",",","apply","it","to","a","function","over","a","window","of","all","elements",",","then","output",".","expected",":","output","successfully"]
code: def test_data_collection_window_all(self):
      """
      target: test window_all() API for pipeline
      method: Get the input data, apply it to a function over a window of all elements,then output.
      expected: output successfully
      """
      p = (
          towhee.pipe.input("n1", "n2")
          .flat_map(
              ("n1", "n2"),
              ("n1", "n2"),
              lambda x, y: [(a, b) for a, b in zip(x, y)],
          )
          .window_all(
              ("n1", "n2"), ("s1", "s2"), lambda x, y: (sum(x), sum(y))
          )
          .output("s1", "s2")
      )
      res = p([1, 2, 3, 4], [2, 3, 4, 5])
      assert res.get() == [10, 14]
      res = p([1, 2, 3, 4], [2, 3])
      assert res.get() == [3, 5]
  
      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 8 for calling the TestDataCollectionAPIsValid obj's underlying member method code with example usage: obj.test_data_collection_window_all() and returns: True