code: def test_collect_queue_metrics() -> None:
      queue = Queue()
      queue.add_job(
          job_type="dataset-config-names",
          dataset="dataset",
          revision="revision",
          config="config",
          split="split",
          difficulty=50,
      )
      assert JobTotalMetricDocument.objects().count() == 1
  
      collect_queue_metrics()
  
      job_metrics = JobTotalMetricDocument.objects().all()
      assert job_metrics
      assert len(job_metrics) == len(Status) * len(
          processing_graph.get_processing_steps()
      )  # One per job status and per step, see libcommon.queue.get_jobs_count_by_status
      waiting_job = next(
          (job for job in job_metrics if job.status == "waiting"), None
      )
      assert waiting_job
      assert waiting_job.total == 1
  
      remaining_status = [
          job for job in job_metrics if job.status != "waiting"
      ]
      assert remaining_status
      assert all(job.total == 0 for job in remaining_status)
  
imports: from libcommon.processing_graph import processing_graph
  from libcommon.queue import JobTotalMetricDocument, Queue
  from libcommon.utils import Status
  from cache_maintenance.queue_metrics import collect_queue_metrics
label_desc: Use image node_id 1 for calling a global function with example usage: test_collect_queue_metrics() without return types