class_docstr: A class used to export/load remote functions and actors.
  Attributes:
      _worker: The associated worker that this manager related.
      _functions_to_export: The remote functions to export when
          the worker gets connected.
      _actors_to_export: The actors to export when the worker gets
          connected.
      _function_execution_info: The function_id
          and execution_info.
      _num_task_executions: The function
          execution times.
      imported_actor_classes: The set of actor classes keys (format:
          ActorClass:function_id) that are already in GCS.
class_docstr_tok: ["A","class","used","to","export\/load","remote","functions","and","actors",".","Attributes",":","_worker",":","The","associated","worker","that","this","manager","related",".","_functions_to_export",":","The","remote","functions","to","export","when","the","worker","gets","connected",".","_actors_to_export",":","The","actors","to","export","when","the","worker","gets","connected",".","_function_execution_info",":","The","function_id","and","execution_info",".","_num_task_executions",":","The","function","execution","times",".","imported_actor_classes",":","The","set","of","actor","classes","keys","(","format",":","ActorClass",":","function_id",")","that","are","already","in","GCS","."]
docstr: Make an executor that wraps a user-defined actor method.
  The wrapped method updates the worker's internal state and performs any
  necessary checkpointing operations.
  Args:
      method_name: The name of the actor method.
      method: The actor method to wrap. This should be a
          method defined on the actor class and should therefore take an
          instance of the actor as the first argument.
      actor_imported: Whether the actor has been imported.
          Checkpointing operations will not be run if this is set to
          False.
  Returns:
      A function that executes the given actor method on the worker's
          stored instance of the actor. The function also updates the
          worker's internal state to record the executed method.
code: def _make_actor_method_executor(
      self, method_name: str, method, actor_imported: bool
  ):
      """Make an executor that wraps a user-defined actor method.
      The wrapped method updates the worker's internal state and performs any
      necessary checkpointing operations.
      Args:
          method_name: The name of the actor method.
          method: The actor method to wrap. This should be a
              method defined on the actor class and should therefore take an
              instance of the actor as the first argument.
          actor_imported: Whether the actor has been imported.
              Checkpointing operations will not be run if this is set to
              False.
      Returns:
          A function that executes the given actor method on the worker's
              stored instance of the actor. The function also updates the
              worker's internal state to record the executed method.
      """
  
      def actor_method_executor(__ray_actor, *args, **kwargs):
          # Execute the assigned method.
          is_bound = is_class_method(method) or is_static_method(
              type(__ray_actor), method_name
          )
          if is_bound:
              return method(*args, **kwargs)
          else:
              return method(__ray_actor, *args, **kwargs)
  
      # Set method_name and method as attributes to the executor closure
      # so we can make decision based on these attributes in task executor.
      # Precisely, asyncio support requires to know whether:
      # - the method is a ray internal method: starts with __ray
      # - the method is a coroutine function: defined by async def
      actor_method_executor.name = method_name
      actor_method_executor.method = method
  
      return actor_method_executor
  
imports: import dis
  import sys
  import hashlib
  import importlib
  import inspect
  import json
  import logging
  import os
  import threading
  import time
  import traceback
  from collections import defaultdict, namedtuple
  from typing import Optional, Callable
  import ray
  import ray._private.profiling
  from ray import cloudpickle
  from ray._private import ray_constants
  from ray._private.inspect_util import is_class_method, is_function_or_method, is_static_method
  from ray._private.ray_constants import KV_NAMESPACE_FUNCTION_TABLE
  from ray._private.utils import check_oversized_function, ensure_str, format_error_message
  from ray._private.serialization import pickle_dumps
  from ray._raylet import JobID, PythonFunctionDescriptor, WORKER_PROCESS_SETUP_HOOK_KEY_NAME_GCS
label_desc: Use image node_id 19 for calling the FunctionActorManager obj's underlying member method code with example usage: obj._make_actor_method_executor(method_name, method, actor_imported) and returns: actor_method_executor, method, method