class_docstr: Multiple progress bar Widget suitable for the notebook
  
  Displays multiple progress bars for a computation, split on computation
  type.
  
  See Also
  --------
  progress: User-level function <--- use this
  MultiProgress: Non-visualization component that contains most logic
  ProgressWidget: Single progress bar widget
class_docstr_tok: ["Multiple","progress","bar","Widget","suitable","for","the","notebook","Displays","multiple","progress","bars","for","a","computation",",","split","on","computation","type",".","See","Also","--","--","--","--","progress",":","User-level","function","<","--","-","use","this","MultiProgress",":","Non-visualization","component","that","contains","most","logic","ProgressWidget",":","Single","progress","bar","widget"]
code: def make_widget(self, all):
      from ipywidgets import HTML, FloatProgress, HBox, VBox
  
      def make_label(key):
          if isinstance(key, tuple):
              # tuple of (group_name, group_id)
              key = key[0]
          key = key.decode() if isinstance(key, bytes) else key
          return html.escape(key)
  
      self.elapsed_time = HTML("")
      self.bars = {
          key: FloatProgress(min=0, max=1, description="")
          for key in all
      }
      self.bar_texts = {key: HTML("") for key in all}
      self.bar_labels = {
          key: HTML(
              '<div style="padding: 0px 10px 0px 10px;'
              " text-align:left; word-wrap: "
              'break-word;">' + make_label(key) + "</div>"
          )
          for key in all
      }
  
      def keyfunc(kv):
          """Order keys by most numerous, then by string name"""
          return kv[::-1]
  
      key_order = [
          k for k, v in sorted(all.items(), key=keyfunc, reverse=True)
      ]
  
      self.bar_widgets = VBox(
          [
              HBox(
                  [
                      self.bar_texts[key],
                      self.bars[key],
                      self.bar_labels[key],
                  ]
              )
              for key in key_order
          ]
      )
      self.widget.children = (self.elapsed_time, self.bar_widgets)
  
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 2 for calling the MultiProgressWidget obj's underlying member method code with example usage: obj.make_widget(all) and returns: html, kv