code: def __init__(self, *args, dask_server=None, **kwargs):
      super().__init__(*args, dask_server=dask_server, **kwargs)
  
      if PrometheusHandler._collectors:
          # Especially during testing, multiple schedulers are started
          # sequentially in the same python process
          for _collector in PrometheusHandler._collectors:
              _collector.server = self.server
          return
  
      PrometheusHandler._collectors = tuple(
          collector(self.server) for collector in COLLECTORS
      )
      # Register collectors
      for instantiated_collector in PrometheusHandler._collectors:
          prometheus_client.REGISTRY.register(instantiated_collector)
  
file_path: distributed/distributed/http/scheduler/prometheus/core.py
imports: from __future__ import annotations
  from collections.abc import Iterator
  from time import time
  import prometheus_client
  import toolz
  from prometheus_client.core import CounterMetricFamily, GaugeMetricFamily
  from distributed.http.prometheus import PrometheusCollector
  from distributed.http.scheduler.prometheus.semaphore import SemaphoreMetricCollector
  from distributed.http.scheduler.prometheus.stealing import WorkStealingMetricCollector
  from distributed.http.utils import RequestHandler
  from distributed.scheduler import ALL_TASK_STATES, Scheduler
label_desc: Use image node_id 1 to create a new PrometheusHandler object from inherited base classes: RequestHandler with example: obj = PrometheusHandler()