docstr: Setup memory table.
  
  This will sort entries first and group them after.
  Sort order will be still kept.
docstr_tok: ["Setup","memory","table",".","This","will","sort","entries","first","and","group","them","after",".","Sort","order","will","be","still","kept","."]
code: def setup(
      self, group_by_type: GroupByType, sort_by_type: SortingType
  ):
      """Setup memory table.
  
      This will sort entries first and group them after.
      Sort order will be still kept.
      """
      self._sort_by(sort_by_type)._group_by(group_by_type)
      for group_memory_table in self.group.values():
          group_memory_table.summarize()
      self.summarize()
      return self
  
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 2 for calling the MemoryTable obj's underlying member method code with example usage: obj.setup(group_by_type, sort_by_type) and returns: self