class_docstr: Maintain a copy of worker events
class_docstr_tok: ["Maintain","a","copy","of","worker","events"]
code: def __init__(self, scheduler=None):
      self.name = "EventStream"
      self.buffer = []
      if scheduler:
          scheduler.add_plugin(self)
  
file_path: distributed/distributed/diagnostics/eventstream.py
imports: from __future__ import annotations
  import logging
  from distributed.core import coerce_to_address, connect
  from distributed.diagnostics.plugin import SchedulerPlugin
  from distributed.worker import dumps_function
label_desc: Use image node_id 1 to create a new EventStream object from inherited base classes: SchedulerPlugin with example: obj = EventStream(scheduler)