code: def test_export_after_shutdown(ray_start_regular):
      # This test checks that we can use actor and remote function definitions
      # across multiple Ray sessions.
  
      @ray.remote
      def f():
          pass
  
      @ray.remote
      class Actor:
          def method(self):
              pass
  
      ray.get(f.remote())
      a = Actor.remote()
      ray.get(a.method.remote())
  
      ray.shutdown()
  
      # Start Ray and use the remote function and actor again.
      ray.init(num_cpus=1)
      ray.get(f.remote())
      a = Actor.remote()
      ray.get(a.method.remote())
  
      ray.shutdown()
  
      # Start Ray again and make sure that these definitions can be exported from
      # workers.
      ray.init(num_cpus=2)
  
      @ray.remote
      def export_definitions_from_worker(remote_function, actor_class):
          ray.get(remote_function.remote())
          actor_handle = actor_class.remote()
          ray.get(actor_handle.method.remote())
  
      ray.get(export_definitions_from_worker.remote(f, Actor))
  
imports: import glob
  import logging
  import multiprocessing
  import os
  import sys
  import tempfile
  import time
  from unittest import mock
  import numpy
  import psutil
  import pytest
  import ray
  import ray._private.gcs_utils
  import ray._private.ray_constants
  import ray._private.utils
  import ray.cluster_utils
  import ray.util.accelerators
  from ray._private.test_utils import wait_for_condition
  from ray.dashboard import k8s_utils
  from ray.runtime_env import RuntimeEnv
label_desc: Use image node_id 1 for calling a global function with example usage: test_export_after_shutdown(ray_start_regular) without return types