code: def test_metrics_folder_with_dashboard_override(
      override_dashboard_dir,
      override_default_dashboard,
      override_serve_dashboard,
  ):
      """
      Tests that the default dashboard files get created.
      """
      uid, global_filters = override_default_dashboard
      serve_uid, serve_global_filters = override_serve_dashboard
  
      with _ray_start(include_dashboard=True) as context:
          session_dir = context["session_dir"]
          assert os.path.exists(
              f"{override_dashboard_dir}/default_grafana_dashboard.json"
          )
          with open(
              f"{session_dir}/metrics/grafana/provisioning/dashboards/default.yml"
          ) as f:
              contents = f.read()
              assert override_dashboard_dir in contents
  
          # Default Dashboard
          with open(
              f"{override_dashboard_dir}/default_grafana_dashboard.json"
          ) as f:
              contents = json.loads(f.read())
              assert contents["uid"] == uid
              for panel in contents["panels"]:
                  for target in panel["targets"]:
                      # Check for standard_global_filters
                      assert (
                          'SessionName=~"$SessionName"'
                          in target["expr"]
                      )
                      # Check for custom global_filters
                      assert global_filters in target["expr"]
              for variable in contents["templating"]["list"]:
                  if variable["name"] == "datasource":
                      continue
                  assert global_filters in variable["definition"]
                  assert global_filters in variable["query"]["query"]
              assert (
                  "supportsGlobalFilterOverride" in contents["rayMeta"]
              )
  
          # Serve Dashboard
          with open(
              f"{override_dashboard_dir}/serve_grafana_dashboard.json"
          ) as f:
              contents = json.loads(f.read())
              assert contents["uid"] == serve_uid
              for panel in contents["panels"]:
                  for target in panel["targets"]:
                      assert serve_global_filters in target["expr"]
              for variable in contents["templating"]["list"]:
                  if variable["name"] == "datasource":
                      continue
                  assert serve_global_filters in variable["definition"]
                  assert (
                      serve_global_filters in variable["query"]["query"]
                  )
              assert (
                  "supportsGlobalFilterOverride" in contents["rayMeta"]
              )
  
          # Serve Deployment Dashboard
          with open(
              f"{override_dashboard_dir}/serve_deployment_grafana_dashboard.json"
          ) as f:
              contents = json.loads(f.read())
              assert contents["uid"] == "rayServeDeploymentDashboard"
              assert (
                  "supportsGlobalFilterOverride" in contents["rayMeta"]
              )
  
file_path: ray/python/ray/tests/test_metrics_head.py
imports: import json
  import logging
  import os
  import pytest
  import sys
  import tempfile
  from ray.dashboard.modules.metrics.dashboards.default_dashboard_panels import DEFAULT_GRAFANA_PANELS
  from ray.dashboard.modules.metrics.dashboards.serve_dashboard_panels import SERVE_GRAFANA_PANELS
  from ray.tests.conftest import _ray_start
label_desc: Use image node_id 5 for calling a global function with example usage: test_metrics_folder_with_dashboard_override(override_dashboard_dir, override_default_dashboard, override_serve_dashboard) without return types