code: def test_progress_quads_many_functions():
      funcnames = ["fn%d" % i for i in range(1000)]
      msg = {
          "all": {fn: 1 for fn in funcnames},
          "memory": {fn: 1 for fn in funcnames},
          "erred": {fn: 0 for fn in funcnames},
          "released": {fn: 0 for fn in funcnames},
          "processing": {fn: 0 for fn in funcnames},
          "queued": {fn: 0 for fn in funcnames},
      }
  
      d = progress_quads(msg, nrows=2)
      color = d.pop("color")
      assert len(set(color)) < 100
  
file_path: distributed/distributed/diagnostics/tests/test_progress_stream.py
imports: from __future__ import annotations
  import pytest
  from dask import delayed
  from distributed.client import wait
  from distributed.diagnostics.progress_stream import progress_quads, progress_stream
  from distributed.utils_test import div, gen_cluster, inc
label_desc: Use image node_id 3 for calling a global function with example usage: test_progress_quads_many_functions() without return types