code: def __init__(self, server: Worker):
      super().__init__(server)
      self.subsystem = "worker"
      self.crick_available = True
      try:
          import crick  # noqa: F401
      except ImportError:
          self.crick_available = False
          logger.debug(
              "Not all prometheus metrics available are exported. "
              "Digest-based metrics require crick to be installed."
          )
  
imports: from __future__ import annotations
  import logging
  from collections.abc import Iterator
  from time import time
  from typing import ClassVar
  import prometheus_client
  from prometheus_client.core import CounterMetricFamily, GaugeMetricFamily, Metric
  from distributed.http.prometheus import PrometheusCollector
  from distributed.http.utils import RequestHandler
  from distributed.worker import Worker
label_desc: Use image node_id 1 to create a new WorkerMetricCollector object from inherited base classes: PrometheusCollector with example: obj = WorkerMetricCollector(server)