code: def test_actor_cuda_visible_devices(shutdown_only):
      """Test user can overwrite CUDA_VISIBLE_DEVICES
      after the actor is created."""
      ray.init(num_gpus=1)
  
      @ray.remote(num_gpus=1)
      class Actor:
          def set_cuda_visible_devices(self, cuda_visible_devices):
              os.environ["CUDA_VISIBLE_DEVICES"] = cuda_visible_devices
  
          def get_cuda_visible_devices(self):
              return os.environ["CUDA_VISIBLE_DEVICES"]
  
      actor = Actor.remote()
      assert ray.get(actor.get_cuda_visible_devices.remote()) == "0"
      ray.get(actor.set_cuda_visible_devices.remote("0,1"))
      assert ray.get(actor.get_cuda_visible_devices.remote()) == "0,1"
  
imports: import collections
  import os
  import sys
  import time
  import pytest
  import ray
  import ray.cluster_utils
label_desc: Use image node_id 14 for calling a global function with example usage: test_actor_cuda_visible_devices(shutdown_only) and returns: os