code: def test_actor_shutdown(ray_start_2_cpus):
      assert ray.available_resources()["CPU"] == 2
      ag = ActorGroup(actor_cls=DummyActor, num_actors=2)
      time.sleep(1)
      assert "CPU" not in ray.available_resources()
      assert len(ray._private.state.actors()) == 2
      ag.shutdown()
      time.sleep(1)
      assert ray.available_resources()["CPU"] == 2
  
      with pytest.raises(RuntimeError):
          ag.return_arg.remote(1)
  
file_path: ray/python/ray/tests/test_actor_group.py
imports: import time
  import warnings
  import pytest
  import ray
  from ray.util.actor_group import ActorGroup
label_desc: Use image node_id 3 for calling a global function with example usage: test_actor_shutdown(ray_start_2_cpus) without return types