code: def save_gpu_ids_shutdown_only():
      # Record the curent value of this environment variable so that we can
      # reset it after the test.
      original_gpu_ids = os.environ.get("CUDA_VISIBLE_DEVICES", None)
  
      yield None
  
      # The code after the yield will run as teardown code.
      ray.shutdown()
      # Reset the environment variable.
      if original_gpu_ids is not None:
          os.environ["CUDA_VISIBLE_DEVICES"] = original_gpu_ids
      else:
          del os.environ["CUDA_VISIBLE_DEVICES"]
  
file_path: ray/python/ray/tests/test_advanced_6.py
imports: import logging
  import os
  import platform
  import signal
  import sys
  import time
  import psutil
  import pytest
  import ray
  import ray.cluster_utils
  from ray._private.test_utils import run_string_as_driver_nonblocking, wait_for_condition, wait_for_pid_to_exit
label_desc: Use image node_id 1 for calling a global function with example usage: save_gpu_ids_shutdown_only() without return types