code: def ray_start(num_cpus=2, num_gpus=None):
      res = ray.init(
          num_cpus=num_cpus,
          num_gpus=num_gpus,
          include_dashboard=False,
          object_store_memory=150 * 1024 * 1024,
      )
      try:
          yield res
      finally:
          ray.shutdown()
          # Delete the cluster address just in case.
          ray._private.utils.reset_ray_address()
  
file_path: ludwig/tests/integration_tests/test_class_imbalance_feature.py
imports: import contextlib
  import os
  import shutil
  import numpy
  import pandas
  import pytest
  from ludwig.api import LudwigModel
  from ludwig.backend import LocalBackend
  from tests.integration_tests.utils import create_data_set_to_use, RAY_BACKEND_CONFIG, spawn
label_desc: Use image node_id 1 for calling a global function with example usage: ray_start(num_cpus, num_gpus) without return types