code: def test_values(client):
      L = [client.submit(inc, i) for i in range(5)]
      wait(L)
      p = MultiProgressWidget(L)
      client.sync(p.listen)
      assert set(p.bars) == {"inc"}
      assert p.status == "finished"
      assert p.comm.closed()
      assert "5 / 5" in p.bar_texts["inc"].value
      assert p.bars["inc"].value == 1.0
  
      x = client.submit(throws, 1)
      p = MultiProgressWidget([x])
      client.sync(p.listen)
      assert p.status == "error"
  
file_path: distributed/distributed/diagnostics/tests/test_progress_widgets.py
imports: from __future__ import annotations
  import re
  from operator import add
  import pytest
  from dask.utils import key_split
  from distributed.client import wait
  from distributed.spans import span
  from distributed.utils_test import dec, gen_cluster, gen_tls_cluster, inc, throws
  from distributed.diagnostics.progressbar import MultiProgressWidget, ProgressWidget, progress
label_desc: Use image node_id 1 for calling a global function with example usage: test_values(client) without return types