code: def _load_test_configuration(
      test: Test,
      anyscale_project: str,
      result: Result,
      smoke_test: bool = False,
      no_terminate: bool = False,
  ) -> Tuple[ClusterManager, CommandRunner, str]:
      logger.info(f"Test config: {test}")
  
      # Populate result paramaters
      result.stable = test.get("stable", True)
      result.smoke_test = smoke_test
      buildkite_url = os.getenv("BUILDKITE_BUILD_URL", "")
      buildkite_job_id = os.getenv("BUILDKITE_JOB_ID", "")
      if buildkite_url:
          buildkite_url += "#" + buildkite_job_id
      result.buildkite_url = buildkite_url
      result.buildkite_job_id = buildkite_job_id
  
      # Setting up working directory
      working_dir = test["working_dir"]
      new_wd = os.path.join(RELEASE_PACKAGE_DIR, working_dir)
      os.chdir(new_wd)
  
      run_type = test["run"].get("type", DEFAULT_RUN_TYPE)
  
      # Workaround while Anyscale Jobs don't support leaving cluster alive
      # after the job has finished.
      # TODO: Remove once we have support in Anyscale
      if no_terminate and run_type == "anyscale_job":
          logger.warning(
              "anyscale_job run type does not support --no-terminate. "
              "Switching to job (Ray Job) run type."
          )
          run_type = "job"
  
      command_runner_cls = type_str_to_command_runner.get(run_type)
      if not command_runner_cls:
          raise ReleaseTestConfigError(
              f"Unknown command runner type: {run_type}. Must be one of "
              f"{list(type_str_to_command_runner.keys())}"
          )
  
      cluster_manager_cls = command_runner_to_cluster_manager[
          command_runner_cls
      ]
      logger.info(f"Got command runner cls: {command_runner_cls}")
      # Extra tags to be set on resources on cloud provider's side
      extra_tags = _get_extra_tags_from_env()
      # We don't need other attributes as they can be derived from the name
      extra_tags["test_name"] = str(test["name"])
      extra_tags["test_smoke_test"] = str(result.smoke_test)
      result.extra_tags = extra_tags
  
      artifact_path = test["run"].get("artifact_path", None)
  
      # Instantiate managers and command runner
      try:
          cluster_manager = cluster_manager_cls(
              test,
              anyscale_project,
              smoke_test=smoke_test,
          )
          command_runner = command_runner_cls(
              cluster_manager,
              JobFileManager(cluster_manager=cluster_manager),
              working_dir,
              artifact_path=artifact_path,
          )
      except Exception as e:
          raise ReleaseTestSetupError(
              f"Error setting up release test: {e}"
          ) from e
  
      return cluster_manager, command_runner, artifact_path
  
imports: import os
  import time
  import traceback
  from typing import Optional, List, Tuple
  from ray_release.alerts.handle import handle_result, require_result
  from ray_release.anyscale_util import get_cluster_name
  from ray_release.buildkite.output import buildkite_group, buildkite_open_last
  from ray_release.cluster_manager.cluster_manager import ClusterManager
  from ray_release.cluster_manager.full import FullClusterManager
  from ray_release.cluster_manager.minimal import MinimalClusterManager
  from ray_release.command_runner.job_runner import JobRunner
  from ray_release.command_runner.command_runner import CommandRunner
  from ray_release.command_runner.anyscale_job_runner import AnyscaleJobRunner
  from ray_release.test import Test
  from ray_release.config import DEFAULT_BUILD_TIMEOUT, DEFAULT_CLUSTER_TIMEOUT, DEFAULT_COMMAND_TIMEOUT, DEFAULT_WAIT_FOR_NODES_TIMEOUT, RELEASE_PACKAGE_DIR, DEFAULT_AUTOSUSPEND_MINS
  from ray_release.template import load_test_cluster_compute
  from ray_release.exception import ReleaseTestConfigError, ReleaseTestSetupError, CommandError, PrepareCommandError, CommandTimeout, PrepareCommandTimeout, TestCommandError, TestCommandTimeout, ClusterEnvCreateError
  from ray_release.file_manager.job_file_manager import JobFileManager
  from ray_release.logger import logger
  from ray_release.reporter.reporter import Reporter
  from ray_release.result import Result, ResultStatus, handle_exception
  from ray_release.signal_handling import setup_signal_handling, reset_signal_handling, register_handler
label_desc: Use image node_id 2 for calling a global function with example usage: _load_test_configuration(test, anyscale_project, result, smoke_test, no_terminate) and returns: cluster_manager,  command_runner,  artifact_path