class_docstr: An actor class.
  
  This is a decorated class. It can be used to create actors.
  
  Attributes:
      __ray_metadata__: Contains metadata for the actor.
class_docstr_tok: ["An","actor","class",".","This","is","a","decorated","class",".","It","can","be","used","to","create","actors",".","Attributes",":","__ray_metadata__",":","Contains","metadata","for","the","actor","."]
docstr: Prevents users from directly inheriting from an ActorClass.
  
  This will be called when a class is defined with an ActorClass object
  as one of its base classes. To intentionally construct an ActorClass,
  use the '_ray_from_modified_class' classmethod.
  
  Raises:
      ActorClassInheritanceException: When ActorClass is inherited.
      AssertionError: If ActorClassInheritanceException is not raised i.e.,
                      conditions for raising it are not met in any
                      iteration of the loop.
      TypeError: In all other cases.
docstr_tok: ["Prevents","users","from","directly","inheriting","from","an","ActorClass",".","This","will","be","called","when","a","class","is","defined","with","an","ActorClass","object","as","one","of","its","base","classes",".","To","intentionally","construct","an","ActorClass",",","use","the","'_ray_from_modified_class","'","classmethod",".","Raises",":","ActorClassInheritanceException",":","When","ActorClass","is","inherited",".","AssertionError",":","If","ActorClassInheritanceException","is","not","raised","i.e.",",","conditions","for","raising","it","are","not","met","in","any","iteration","of","the","loop",".","TypeError",":","In","all","other","cases","."]
code: def __init__(cls, name, bases, attr):
      """Prevents users from directly inheriting from an ActorClass.
  
      This will be called when a class is defined with an ActorClass object
      as one of its base classes. To intentionally construct an ActorClass,
      use the '_ray_from_modified_class' classmethod.
  
      Raises:
          ActorClassInheritanceException: When ActorClass is inherited.
          AssertionError: If ActorClassInheritanceException is not raised i.e.,
                          conditions for raising it are not met in any
                          iteration of the loop.
          TypeError: In all other cases.
      """
      for base in bases:
          if isinstance(base, ActorClass):
              raise ActorClassInheritanceException(
                  f"Attempted to define subclass '{name}' of actor "
                  f"class '{base.__ray_metadata__.class_name}'. "
                  "Inheriting from actor classes is "
                  "not currently supported. You can instead "
                  "inherit from a non-actor base class and make "
                  "the derived class an actor class (with "
                  "@ray.remote)."
              )
  
      # This shouldn't be reached because one of the base classes must be
      # an actor class if this was meant to be subclassed.
      assert False, (
          "ActorClass.__init__ should not be called. Please use "
          "the @ray.remote decorator instead."
      )
  
imports: import inspect
  import logging
  import weakref
  from typing import Any, Dict, List, Optional, Union
  import ray._private.ray_constants
  import ray._private.signature
  import ray._private.worker
  import ray._raylet
  from ray import ActorClassID, Language, cross_language
  from ray._private import ray_option_utils
  from ray._private.async_compat import is_async_func
  from ray._private.auto_init_hook import wrap_auto_init
  from ray._private.client_mode_hook import client_mode_convert_actor, client_mode_hook, client_mode_should_convert
  from ray._private.inspect_util import is_class_method, is_function_or_method, is_static_method
  from ray._private.ray_option_utils import _warn_if_using_deprecated_placement_group
  from ray._private.utils import get_runtime_env_info, parse_runtime_env
  from ray._raylet import STREAMING_GENERATOR_RETURN, ObjectRefGenerator, PythonFunctionDescriptor, raise_sys_exit_with_custom_error_message
  from ray.exceptions import AsyncioActorExit
  from ray.util.annotations import DeveloperAPI, PublicAPI
  from ray.util.placement_group import _configure_placement_group_based_on_context
  from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy, SchedulingStrategyT
  from ray.util.tracing.tracing_helper import _inject_tracing_into_class, _tracing_actor_creation, _tracing_actor_method_invocation
label_desc: Use image node_id 1 to create a new ActorClass object  with example: obj = ActorClass(cls, name, bases, attr)