class_docstr: Initialize the serialization library.
  
  This defines a custom serializer for object refs and also tells ray to
  serialize several exception classes that we define for error handling.
code: def __init__(self, worker):
      self.worker = worker
      self._thread_local = threading.local()
  
      def actor_handle_reducer(obj):
          ray._private.worker.global_worker.check_connected()
          serialized, actor_handle_id = obj._serialization_helper()
          # Update ref counting for the actor handle
          self.add_contained_object_ref(actor_handle_id)
          return _actor_handle_deserializer, (serialized,)
  
      self._register_cloudpickle_reducer(
          ray.actor.ActorHandle, actor_handle_reducer
      )
  
      def object_ref_reducer(obj):
          worker = ray._private.worker.global_worker
          worker.check_connected()
          self.add_contained_object_ref(obj)
          (
              obj,
              owner_address,
              object_status,
          ) = worker.core_worker.serialize_object_ref(obj)
          return _object_ref_deserializer, (
              obj.binary(),
              obj.call_site(),
              owner_address,
              object_status,
          )
  
      self._register_cloudpickle_reducer(
          ray.ObjectRef, object_ref_reducer
      )
  
      def object_ref_generator_reducer(obj):
          return DynamicObjectRefGenerator, (obj._refs,)
  
      self._register_cloudpickle_reducer(
          DynamicObjectRefGenerator, object_ref_generator_reducer
      )
  
      serialization_addons.apply(self)
  
imports: import io
  import logging
  import threading
  import traceback
  from typing import Any
  import google.protobuf.message
  import ray._private.utils
  import ray.cloudpickle
  from ray._private import ray_constants
  from ray._raylet import MessagePackSerializedObject, MessagePackSerializer, DynamicObjectRefGenerator, Pickle5SerializedObject, Pickle5Writer, RawSerializedObject, split_buffer, unpack_pickle5_buffers
  from ray.core.generated.common_pb2 import ErrorType, RayErrorInfo
  from ray.exceptions import ActorPlacementGroupRemoved, ActorUnschedulableError, LocalRayletDiedError, NodeDiedError, ObjectFetchTimedOutError, ObjectLostError, ObjectReconstructionFailedError, ObjectReconstructionFailedLineageEvictedError, ObjectReconstructionFailedMaxAttemptsExceededError, OutOfDiskError, OwnerDiedError, PlasmaObjectNotAvailable, RayActorError, RayError, RaySystemError, RayTaskError, ReferenceCountingAssertionError, ObjectFreedError, RuntimeEnvSetupError, TaskCancelledError, TaskPlacementGroupRemoved, TaskUnschedulableError, WorkerCrashedError, OutOfMemoryError, ObjectRefStreamEndOfStreamError
  from ray.util import serialization_addons
  from ray.util import inspect_serializability
label_desc: Use image node_id 1 to create a new SerializationContext object  with example: obj = SerializationContext(worker)