code: def test_dataframes():
      pd = pytest.importorskip("pandas")
      from streamz.dataframe import DataFrame
  
      data = [{"x": i, "y": 2 * i} for i in range(10)]
  
      s = Batch(example=[{"x": 0, "y": 0}])
      sdf = s.map(
          lambda d: toolz.assoc(d, "z", d["x"] + d["y"])
      ).to_dataframe()
  
      assert isinstance(sdf, DataFrame)
  
      L = sdf.stream.sink_to_list()
  
      for batch in toolz.partition_all(3, data):
          s.emit(batch)
  
      result = pd.concat(L)
      assert result.z.tolist() == [3 * i for i in range(10)]
  
imports: import pytest
  import toolz
  from streamz.batch import Batch, Streaming
  from streamz.utils_test import inc
label_desc: Use image node_id 2 for calling a global function with example usage: test_dataframes() without return types