code: def test_implicit_resource(ray_start_regular):
      @ray.remote(
          num_cpus=1,
          resources={ray._raylet.IMPLICIT_RESOURCE_PREFIX + "a": 1},
      )
      class Actor:
          def ping(self):
              return ray.get_runtime_context().get_node_id()
  
      # The first actor is schedulable.
      a1 = Actor.remote()
      ray.get(a1.ping.remote())
  
      # The second actor will be pending since
      # only one such actor can run on a single node.
      a2 = Actor.remote()
      time.sleep(2)
      actors = list_actors(
          filters=[("actor_id", "=", a2._actor_id.hex())]
      )
      assert actors[0]["state"] == "PENDING_CREATION"
  
imports: import os
  import sys
  import time
  import ray
  from ray.util.state import list_actors
label_desc: Use image node_id 1 for calling a global function with example usage: test_implicit_resource(ray_start_regular) and returns: ray