code: def getRegistry(self) -> CollectorRegistry:
      # taken from https://github.com/perdy/starlette-prometheus/blob/master/starlette_prometheus/view.py
      # see https://github.com/prometheus/client_python#multiprocess-mode-eg-gunicorn
      if "PROMETHEUS_MULTIPROC_DIR" in os.environ:
          registry = CollectorRegistry()
          MultiProcessCollector(registry=registry)
      else:
          registry = REGISTRY
      return registry
  
imports: import os
  import time
  from types import TracebackType
  from typing import Any, Optional, TypeVar
  from prometheus_client import REGISTRY, CollectorRegistry, Gauge, Histogram, generate_latest
  from prometheus_client.multiprocess import MultiProcessCollector
  from psutil import disk_usage
  from libcommon.queue import JobTotalMetricDocument
  from libcommon.simple_cache import CacheTotalMetricDocument
  from libcommon.storage import StrPath
label_desc: Use image node_id 1 for calling the Prometheus obj's underlying member method code with example usage: obj.getRegistry() and returns: registry