code: def test_filter():
      a = Batch()
      f = a.filter(lambda x: x % 2 == 0)
      s = f.to_stream()
      L = s.sink_to_list()
  
      a.emit([1, 2, 3, 4])
      a.emit([5, 6])
  
      assert L == [2, 4, 6]
  
imports: import pytest
  import toolz
  from streamz.batch import Batch, Streaming
  from streamz.utils_test import inc
label_desc: Use image node_id 4 for calling a global function with example usage: test_filter() without return types