code: def test_asyncio_actor_shutdown_when_non_async_method_mixed(
      ray_start_regular_shared,
  ):
      # It is a regression test.
      # https://github.com/ray-project/ray/issues/32376
      # Make sure the core worker doesn't crash when
      # exit_actor is used when async & regular actor tasks
      # are executed.
      @ray.remote
      class A:
          async def f(self):
              await asyncio.sleep(1)
              ray.actor.exit_actor()
  
          def ping(self):
              pass
  
      a = A.remote()
      a.f.remote()
  
      with pytest.raises(
          ray.exceptions.RayActorError,
          match=("exit_actor"),
      ):
          ray.get([a.ping.remote() for _ in range(10000)])
  
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 11 for calling a global function with example usage: test_asyncio_actor_shutdown_when_non_async_method_mixed(ray_start_regular_shared) without return types