code: def test_parse_cluster_info(
      address_param: Tuple[str, str, str],
      create_cluster_if_needed: bool,
      cookies: Optional[Dict[str, str]],
      metadata: Optional[Dict[str, str]],
      headers: Optional[Dict[str, str]],
  ):
      """
      Test ray.dashboard.modules.dashboard_sdk.parse_cluster_info for different
      format of addresses.
      """
      mock_get_job_submission_client_cluster = Mock(
          return_value="Ray ClusterInfo"
      )
      mock_module = Mock()
      mock_module.get_job_submission_client_cluster_info = Mock(
          return_value="Other module ClusterInfo"
      )
      mock_import_module = Mock(return_value=mock_module)
  
      address, module_string, inner_address = address_param
  
      with patch.multiple(
          "ray.dashboard.modules.dashboard_sdk",
          get_job_submission_client_cluster_info=mock_get_job_submission_client_cluster,
      ), patch.multiple("importlib", import_module=mock_import_module):
          if module_string == "ray":
              with pytest.raises(ValueError, match="ray://"):
                  parse_cluster_info(
                      address,
                      create_cluster_if_needed=create_cluster_if_needed,
                      cookies=cookies,
                      metadata=metadata,
                      headers=headers,
                  )
          elif module_string == "other_module":
              assert (
                  parse_cluster_info(
                      address,
                      create_cluster_if_needed=create_cluster_if_needed,
                      cookies=cookies,
                      metadata=metadata,
                      headers=headers,
                  )
                  == "Other module ClusterInfo"
              )
              mock_import_module.assert_called_once_with(module_string)
              mock_module.get_job_submission_client_cluster_info.assert_called_once_with(
                  inner_address,
                  create_cluster_if_needed=create_cluster_if_needed,
                  cookies=cookies,
                  metadata=metadata,
                  headers=headers,
              )
  
imports: from pathlib import Path
  import tempfile
  import time
  import os
  from ray.dashboard.modules.job.pydantic_models import JobType
  import requests
  import pytest
  import psutil
  import sys
  from typing import Dict, Optional, Tuple
  from unittest.mock import Mock, patch
  from ray._private.ray_constants import DEFAULT_DASHBOARD_AGENT_LISTEN_PORT
  from ray._private.test_utils import format_web_url, wait_for_condition, wait_until_server_available
  from ray.dashboard.modules.dashboard_sdk import ClusterInfo, DEFAULT_DASHBOARD_ADDRESS, parse_cluster_info
  from ray.dashboard.modules.job.sdk import JobSubmissionClient, JobStatus
  from ray.dashboard.tests.conftest import *
  from ray.dashboard.consts import RAY_JOB_ALLOW_DRIVER_ON_WORKER_NODES_ENV_VAR
  from ray.tests.conftest import _ray_start
  import ray
  import ray.experimental.internal_kv
  from ray.util.state import list_nodes
label_desc: Use image node_id 3 for calling a global function with example usage: test_parse_cluster_info(address_param, create_cluster_if_needed, cookies, metadata, headers) without return types