code: def actor_table_data_to_dict(message):
      orig_message = dashboard_utils.message_to_dict(
          message,
          {
              "actorId",
              "parentId",
              "jobId",
              "workerId",
              "rayletId",
              "callerId",
              "taskId",
              "parentTaskId",
              "sourceActorId",
          },
          including_default_value_fields=True,
      )
      # The complete schema for actor table is here:
      #     src/ray/protobuf/gcs.proto
      # It is super big and for dashboard, we don't need that much information.
      # Only preserve the necessary ones here for memory usage.
      fields = {
          "actorId",
          "jobId",
          "pid",
          "address",
          "state",
          "name",
          "numRestarts",
          "timestamp",
          "className",
          "startTime",
          "endTime",
          "reprName",
      }
      light_message = {
          k: v for (k, v) in orig_message.items() if k in fields
      }
      light_message["actorClass"] = orig_message["className"]
      exit_detail = "-"
      if "deathCause" in orig_message:
          context = orig_message["deathCause"]
          if "actorDiedErrorContext" in context:
              exit_detail = context["actorDiedErrorContext"][
                  "errorMessage"
              ]  # noqa
          elif "runtimeEnvFailedContext" in context:
              exit_detail = context["runtimeEnvFailedContext"][
                  "errorMessage"
              ]  # noqa
          elif "actorUnschedulableContext" in context:
              exit_detail = context["actorUnschedulableContext"][
                  "errorMessage"
              ]  # noqa
          elif "creationTaskFailureContext" in context:
              exit_detail = context["creationTaskFailureContext"][
                  "formattedExceptionString"
              ]  # noqa
      light_message["exitDetail"] = exit_detail
      light_message["startTime"] = int(light_message["startTime"])
      light_message["endTime"] = int(light_message["endTime"])
      light_message["requiredResources"] = dict(
          message.required_resources
      )
  
      return light_message
  
file_path: ray/python/ray/dashboard/modules/actor/actor_head.py
imports: import asyncio
  import logging
  import os
  import time
  from collections import deque
  import aiohttp.web
  import ray.dashboard.optional_utils
  import ray.dashboard.utils
  from ray._private.gcs_pubsub import GcsAioActorSubscriber
  from ray.core.generated import gcs_service_pb2, gcs_service_pb2_grpc
  from ray.dashboard.datacenter import DataSource, DataOrganizer
  from ray.dashboard.modules.actor import actor_consts
  from ray.dashboard.optional_utils import rest_response
label_desc: Use image node_id 1 for calling a global function with example usage: actor_table_data_to_dict(message) and returns: light_message