code: def test_actor_creation(ray_start_2_cpus):
      assert ray.available_resources()["CPU"] == 2
      with warnings.catch_warnings(record=True) as w:
          ag = ActorGroup(actor_cls=DummyActor, num_actors=2)
          assert any(
              "use ray.util.multiprocessing" in str(warning.message)
              for warning in w
          )
      assert len(ag) == 2
      time.sleep(1)
      # Make sure both CPUs are being used by the actors.
      assert "CPU" not in ray.available_resources()
      ag.shutdown()
  
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 1 for calling a global function with example usage: test_actor_creation(ray_start_2_cpus) without return types