code: def test_zero_cpus(shutdown_only):
      ray.init(num_cpus=0)
  
      # We should be able to execute a task that requires 0 CPU resources.
      @ray.remote(num_cpus=0)
      def f():
          return 1
  
      ray.get(f.remote())
  
      # We should be able to create an actor that requires 0 CPU resources.
      @ray.remote(num_cpus=0)
      class Actor:
          def method(self):
              pass
  
      a = Actor.remote()
      x = a.method.remote()
      ray.get(x)
  
imports: import logging
  import os
  import sys
  import time
  import numpy
  import pytest
  import ray
  import ray.cluster_utils
  from ray._private.test_utils import RayTestTimeoutException, wait_for_condition
  from ray.util.placement_group import placement_group
  from ray.util.accelerators import AWS_NEURON_CORE
  from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy
label_desc: Use image node_id 2 for calling a global function with example usage: test_zero_cpus(shutdown_only) and returns: int