code: def test_multibar_func_warns(client):
      """Deprecate `func`, use `group_by`"""
      L = client.map(inc, range(100))
      L2 = client.map(dec, L)
      L3 = client.map(add, L, L2)
  
      # ensure default value if nothing is set
      p = MultiProgressWidget(L3)
      assert p.group_by == key_split
  
      with pytest.warns(
          DeprecationWarning,
          match="`func` is deprecated, use `group_by` instead",
      ):
          MultiProgressWidget(L3, func="foo")
  
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 6 for calling a global function with example usage: test_multibar_func_warns(client) without return types