code: def __init__(
      self,
      keys,
      scheduler=None,
      *,
      func=None,
      group_by="prefix",
      interval="100ms",
      complete=False,
      **kwargs,
  ):
      self.scheduler = get_scheduler(scheduler)
  
      self.client = None
      for key in keys:
          if hasattr(key, "client"):
              self.client = weakref.ref(key.client)
              break
  
      if func is not None:
          warnings.warn(
              "`func` is deprecated, use `group_by` instead",
              category=DeprecationWarning,
          )
          group_by = func
      elif group_by in (None, "prefix"):
          group_by = key_split
  
      self.keys = {k.key if hasattr(k, "key") else k for k in keys}
      self.group_by = group_by
      self.interval = interval
      self.complete = complete
      self._start_time = default_timer()
  
imports: from __future__ import annotations
  import html
  import logging
  import sys
  import warnings
  import weakref
  from contextlib import suppress
  from timeit import default_timer
  from typing import Callable
  from tlz import valmap
  from tornado.ioloop import IOLoop
  import dask
  from dask.utils import key_split
  from distributed.client import default_client, futures_of
  from distributed.core import CommClosedError, clean_exception, coerce_to_address, connect
  from distributed.diagnostics.progress import MultiProgress, Progress, format_time
  from distributed.protocol.pickle import dumps
  from distributed.utils import LoopRunner, is_kernel
label_desc: Use image node_id 1 to create a new MultiProgressBar object  with example: obj = MultiProgressBar(keys, scheduler)