docstr: Run when the scheduler restarts itself
docstr_tok: ["Run","when","the","scheduler","restarts","itself"]
code: def restart(self, scheduler, **kwargs):
      """Run when the scheduler restarts itself"""
      self.socket.send("restart", {})
  
file_path: distributed/distributed/diagnostics/websocket.py
imports: from __future__ import annotations
  from dask.utils import key_split
  from distributed.diagnostics.plugin import SchedulerPlugin
  from distributed.diagnostics.task_stream import colors
label_desc: Use image node_id 2 for calling the WebsocketPlugin obj's underlying member method code with example usage: obj.restart(scheduler) without return types