code: def __init__(
      self,
      *,
      object_ref: dict,
      node_address: str,
      is_driver: bool,
      pid: int,
  ):
      # worker info
      self.is_driver = is_driver
      self.pid = pid
      self.node_address = node_address
  
      # object info
      self.task_status = object_ref.get("taskStatus", "?")
      if self.task_status == "NIL":
          self.task_status = "-"
      self.attempt_number = int(object_ref.get("attemptNumber", 0))
      if self.attempt_number > 0:
          self.task_status = (
              f"Attempt #{self.attempt_number + 1}: {self.task_status}"
          )
      self.object_size = int(object_ref.get("objectSize", -1))
      self.call_site = object_ref.get("callSite", "<Unknown>")
      if len(self.call_site) == 0:
          self.call_site = "disabled"
      self.object_ref = ray.ObjectRef(
          decode_object_ref_if_needed(object_ref["objectId"])
      )
  
      # reference info
      self.local_ref_count = int(object_ref.get("localRefCount", 0))
      self.pinned_in_memory = bool(
          object_ref.get("pinnedInMemory", False)
      )
      self.submitted_task_ref_count = int(
          object_ref.get("submittedTaskRefCount", 0)
      )
      self.contained_in_owned = [
          ray.ObjectRef(decode_object_ref_if_needed(object_ref))
          for object_ref in object_ref.get("containedInOwned", [])
      ]
      self.reference_type = self._get_reference_type()
  
imports: import base64
  import logging
  from collections import defaultdict
  from enum import Enum
  from typing import List
  import ray
  from ray._private.internal_api import node_stats
  from ray._raylet import ActorID, JobID, TaskID
label_desc: Use image node_id 1 to create a new MemoryTableEntry object  with example: obj = MemoryTableEntry()