code: def ray_start_4_cpus():
      address_info = ray.init(num_cpus=4)
      yield address_info
      # The code after the yield will run as teardown code.
      ray.shutdown()
  
file_path: ray/python/ray/train/tests/test_torch_accelerate.py
imports: import os
  from tempfile import TemporaryDirectory
  import pytest
  import torch
  import torch.nn
  from accelerate import Accelerator
  import ray
  import ray.train
  from ray.train import Checkpoint, ScalingConfig
  from ray.train.examples.pytorch.torch_linear_example import LinearDataset
  from ray.train.torch import TorchTrainer
label_desc: Use image node_id 1 for calling a global function with example usage: ray_start_4_cpus() without return types