docstr: Group entries and summarize the result.
  
  NOTE: Each group is another MemoryTable.
docstr_tok: ["Group","entries","and","summarize","the","result",".","NOTE",":","Each","group","is","another","MemoryTable","."]
code: def _group_by(self, group_by_type: GroupByType):
      """Group entries and summarize the result.
  
      NOTE: Each group is another MemoryTable.
      """
      # Reset group
      self.group = {}
  
      # Build entries per group.
      group = defaultdict(list)
      for entry in self.table:
          group[entry.group_key(group_by_type)].append(entry)
  
      # Build a group table.
      for group_key, entries in group.items():
          self.group[group_key] = MemoryTable(
              entries, group_by_type=None, sort_by_type=None
          )
      for group_key, group_memory_table in self.group.items():
          group_memory_table.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 6 for calling the MemoryTable obj's underlying member method code with example usage: obj._group_by(group_by_type) and returns: self