code: def test_actor_scheduling(shutdown_only):
      ray.init(num_cpus=1)
  
      @ray.remote
      class A:
          def run_fail(self):
              ray.actor.exit_actor()
  
          def get(self):
              return 1
  
      a = A.remote()
      a.run_fail.remote()
      with pytest.raises(
          ray.exceptions.RayActorError, match="exit_actor"
      ):
          ray.get([a.get.remote()])
  
imports: import logging
  import subprocess
  import sys
  import time
  from pathlib import Path
  import os
  import pytest
  from unittest import mock
  import ray
  import ray.cluster_utils
  from ray._private.test_utils import wait_for_condition
  from ray.autoscaler._private.constants import RAY_PROCESSES
  import psutil
label_desc: Use image node_id 1 for calling a global function with example usage: test_actor_scheduling(shutdown_only) and returns: int