code: def test_buffer_sync():  # noqa: F811
      with cluster() as (s, [a, b]):
          with Client(s["address"]) as c:  # noqa: F841
              source = Stream()
              buff = source.scatter().map(slowinc, delay=0.5).buffer(5)
              L = buff.gather().sink_to_list()
  
              start = time.time()
              for i in range(5):
                  source.emit(i)
              end = time.time()
              assert end - start < 0.5
  
              for i in range(5, 10):
                  source.emit(i)
  
              while len(L) < 10:
                  time.sleep(0.01)
                  assert time.time() - start < 5
  
              assert L == list(map(inc, range(10)))
  
file_path: streamz/streamz/tests/test_dask.py
imports: import asyncio
  from operator import add
  import random
  import time
  import pytest
  from tornado import gen
  from streamz.dask import scatter
  from streamz import RefCounter, Stream
  from distributed import Future, Client
  from distributed.utils import sync
  from distributed.utils_test import gen_cluster, inc, cluster, loop, slowinc
label_desc: Use image node_id 4 for calling a global function with example usage: test_buffer_sync() without return types