code: def test_actor_deletion_with_gpus(shutdown_only):
      ray.init(
          num_cpus=1,
          num_gpus=1,
          object_store_memory=int(150 * 1024 * 1024),
      )
  
      # When an actor that uses a GPU exits, make sure that the GPU resources
      # are released.
  
      @ray.remote(num_gpus=1)
      class Actor:
          def getpid(self):
              return os.getpid()
  
      for _ in range(5):
          # If we can successfully create an actor, that means that enough
          # GPU resources are available.
          a = Actor.remote()
          ray.get(a.getpid.remote())
  
imports: import collections
  import os
  import sys
  import time
  import pytest
  import ray
  import ray.cluster_utils
label_desc: Use image node_id 1 for calling a global function with example usage: test_actor_deletion_with_gpus(shutdown_only) and returns: os