code: def test_prome_file_discovery_run_by_dashboard(shutdown_only):
      ray.init(num_cpus=0)
      global_node = ray._private.worker._global_node
      temp_dir = global_node.get_temp_dir_path()
  
      def is_service_discovery_exist():
          for path in pathlib.Path(temp_dir).iterdir():
              if PROMETHEUS_SERVICE_DISCOVERY_FILE in str(path):
                  return True
          return False
  
      wait_for_condition(is_service_discovery_exist)
  
imports: import signal
  import json
  import os
  import pathlib
  import sys
  import requests
  from pprint import pformat
  from unittest.mock import MagicMock
  import numpy
  import pytest
  import ray
  from ray.util.state import list_nodes
  from ray._private.metrics_agent import PrometheusServiceDiscoveryWriter
  from ray._private.ray_constants import PROMETHEUS_SERVICE_DISCOVERY_FILE
  from ray._private.test_utils import SignalActor, fetch_prometheus, fetch_prometheus_metrics, get_log_batch, wait_for_condition, raw_metrics
  from ray.autoscaler._private.constants import AUTOSCALER_METRIC_PORT
  from ray.dashboard.consts import DASHBOARD_METRIC_PORT
  from ray.util.metrics import Counter, Gauge, Histogram
label_desc: Use image node_id 7 for calling a global function with example usage: test_prome_file_discovery_run_by_dashboard(shutdown_only) and returns: False, True