code: def test_asyncio_exit_actor_with_concurrency_group(
      ray_start_regular_shared,
  ):
      @ray.remote(concurrency_groups={"async": 2})
      class Actor:
          async def getpid(self):
              return os.getpid()
  
          async def exit(self):
              ray.actor.exit_actor()
  
          @ray.method(concurrency_group="async")
          async def loop_forever(self):
              while True:
                  await asyncio.sleep(5)
  
      a = Actor.remote()
      a.loop_forever.remote()
      pid = ray.get(a.getpid.remote())
      with pytest.raises(ray.exceptions.RayActorError):
          ray.get(a.exit.remote())
      wait_for_pid_to_exit(pid)
  
imports: import asyncio
  import os
  import sys
  import threading
  import time
  import pytest
  import ray
  from ray._private.client_mode_hook import client_mode_should_convert
  from ray._private.test_utils import SignalActor, kill_actor_and_wait_for_failure, wait_for_condition, wait_for_pid_to_exit
label_desc: Use image node_id 6 for calling a global function with example usage: test_asyncio_exit_actor_with_concurrency_group(ray_start_regular_shared) and returns: os