code: def test_progress_quads():
      msg = {
          "all": {"inc": 5, "dec": 1, "add": 4},
          "memory": {"inc": 2, "dec": 0, "add": 1},
          "erred": {"inc": 0, "dec": 1, "add": 0},
          "released": {"inc": 1, "dec": 0, "add": 1},
          "processing": {"inc": 1, "dec": 0, "add": 2},
          "queued": {"inc": 1, "dec": 0, "add": 2},
          "no-worker": {"inc": 1, "dec": 0, "add": 0},
      }
  
      d = progress_quads(msg, nrows=2)
      color = d.pop("color")
      assert len(set(color)) == 3
      expected = {
          "name": ["inc", "add", "dec"],
          "show-name": ["inc", "add", "dec"],
          "left": [0, 0, 1],
          "right": [0.9, 0.9, 1.9],
          "top": [0, -1, 0],
          "bottom": [-0.8, -1.8, -0.8],
          "all": [5, 4, 1],
          "released": [1, 1, 0],
          "memory": [2, 1, 0],
          "erred": [0, 0, 1],
          "processing": [1, 2, 0],
          "queued": [1, 2, 0],
          "no-worker": [1, 0, 0],
          "done": ["3 / 5", "2 / 4", "1 / 1"],
          "released-loc": [0.9 * 1 / 5, 0.25 * 0.9, 1.0],
          "memory-loc": [0.9 * 3 / 5, 0.5 * 0.9, 1.0],
          "erred-loc": [0.9 * 3 / 5, 0.5 * 0.9, 1.9],
          "processing-loc": [0.9 * 4 / 5, 1 * 0.9, 1 * 0.9 + 1],
          "queued-loc": [1 * 0.9, 1.5 * 0.9, 1 * 0.9 + 1],
          "no-worker-loc": [1 * 0.9, 1.5 * 0.9, 1 * 0.9 + 1],
      }
      assert d == expected
  
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 1 for calling a global function with example usage: test_progress_quads() without return types