code: def start_connected_cluster():
      # Start the Ray processes.
      cluster = _start_new_cluster()
      os.environ["TUNE_STATE_REFRESH_PERIOD"] = "0.1"
      yield cluster
      # The code after the yield will run as teardown code.
      ray.shutdown()
      cluster.shutdown()
  
imports: import time
  import os
  import pytest
  import sys
  from unittest.mock import MagicMock
  import ray
  from ray import tune
  from ray.train import CheckpointConfig
  from ray.cluster_utils import Cluster
  from ray.train._internal.storage import StorageContext
  from ray.tune.error import TuneError
  from ray.tune.search import BasicVariantGenerator
  from ray.tune.experiment import Trial
  from ray.tune.execution.tune_controller import TuneController
label_desc: Use image node_id 4 for calling a global function with example usage: start_connected_cluster() without return types