code: def get(self):
      scheduler = self.server
      erred = 0
      nbytes = 0
      nthreads = 0
      memory = 0
      processing = 0
      released = 0
      waiting = 0
      waiting_data = 0
      desired_workers = scheduler.adaptive_target()
  
      for ts in scheduler.tasks.values():
          if ts.exception_blame is not None:
              erred += 1
          elif ts.state == "released":
              released += 1
          if ts.waiting_on:
              waiting += 1
          if ts.waiters:
              waiting_data += 1
      for ws in scheduler.workers.values():
          nthreads += ws.nthreads
          memory += len(ws.has_what)
          nbytes += ws.nbytes
          processing += len(ws.processing)
  
      response = {
          "bytes": nbytes,
          "clients": len(scheduler.clients),
          "cores": nthreads,
          "erred": erred,
          "hosts": len(scheduler.host_info),
          "idle": len(scheduler.idle),
          "memory": memory,
          "processing": processing,
          "released": released,
          "saturated": len(scheduler.saturated),
          "tasks": len(scheduler.tasks),
          "unrunnable": len(scheduler.unrunnable),
          "waiting": waiting,
          "waiting_data": waiting_data,
          "workers": len(scheduler.workers),
          "desired_workers": desired_workers,
      }
      self.write(response)
  
file_path: distributed/distributed/http/scheduler/json.py
imports: from __future__ import annotations
  from distributed.http.utils import RequestHandler
  from distributed.utils import log_errors
label_desc: Use image node_id 1 for calling the CountsJSON obj's underlying member method code with example usage: obj.get() without return types