code: def ray_start_2_node_cluster(
      num_cpus_per_node: int, num_gpus_per_node: int
  ):
      cluster = Cluster()
      for _ in range(2):
          cluster.add_node(
              num_cpus=num_cpus_per_node, num_gpus=num_gpus_per_node
          )
  
      ray.init(address=cluster.address)
  
      yield
  
      ray.shutdown()
      cluster.shutdown()
  
imports: import contextlib
  import os
  import tempfile
  import time
  import uuid
  from unittest.mock import patch
  import pytest
  import torch
  import ray
  import ray.train
  from ray.cluster_utils import Cluster
  from ray.train import Checkpoint, RunConfig, ScalingConfig
  from ray.train.examples.pytorch.torch_linear_example import train_func
  from ray.train.torch import TorchCheckpoint, TorchConfig, TorchPredictor, TorchTrainer
  from ray.train.trainer import TrainingFailedError
label_desc: Use image node_id 2 for calling a global function with example usage: ray_start_2_node_cluster(num_cpus_per_node, num_gpus_per_node) without return types