class_docstr: Keep track of all keys, grouped by key_split
class_docstr_tok: ["Keep","track","of","all","keys",",","grouped","by","key_split"]
code: def __init__(self, scheduler):
      self.all = defaultdict(set)
      self.nbytes = defaultdict(int)
      self.state = defaultdict(lambda: defaultdict(set))
      self.scheduler = scheduler
  
      for ts in self.scheduler.tasks.values():
          key = ts.key
          prefix = ts.prefix.name
          self.all[prefix].add(key)
          self.state[ts.state][prefix].add(key)
          if ts.nbytes >= 0:
              self.nbytes[prefix] += ts.nbytes
  
      scheduler.add_plugin(self)
  
imports: from __future__ import annotations
  import asyncio
  import logging
  import warnings
  from collections import defaultdict
  from timeit import default_timer
  from typing import ClassVar
  from tlz import groupby, valmap
  from dask.base import tokenize
  from dask.utils import key_split
  from distributed.diagnostics.plugin import SchedulerPlugin
  from distributed.metrics import time
label_desc: Use image node_id 1 to create a new AllProgress object from inherited base classes: SchedulerPlugin with example: obj = AllProgress(scheduler)