class_docstr: Complements the event system by providing aggregation functionality. How the events are aggregated
  is specified by the event interface decorators (see event_decorators.py).
  
  Note that the statistics calculation for episode aggregators will automatically be
  triggered on every `increment_log_step()` call.
class_docstr_tok: ["Complements","the","event","system","by","providing","aggregation","functionality",".","How","the","events","are","aggregated","is","specified","by","the","event","interface","decorators","(","see","event_decorators.py",")",".","Note","that","the","statistics","calculation","for","episode","aggregators","will","automatically","be","triggered","on","every","`","increment_log_step","(",")","`","call","."]
docstr: "helper to project groups, ie. setting all other tuple positions to None
  
  e.g. suppose group_attribute references the second position in the group tuple, then
  we project ('g1_value', 'g2_value', 'g3_value') to (None, 'g2_value', None)
docstr_tok: ["``","helper","to","project","groups",",","ie",".","setting","all","other","tuple","positions","to","None","e.g",".","suppose","group_attribute","references","the","second","position","in","the","group","tuple",",","then","we","project","(","'g1_value","'",",","'g2_value","'",",","'g3_value","'",")","to","(","None",",","'g2_value","'",",","None",")"]
code: def _project_group(
      cls,
      group_tuple: LogStatsGroup,
      group_attribute: str,
      all_group_attributes: List[str],
      event: Callable,
  ) -> LogStatsGroup:
      """ "helper to project groups, ie. setting all other tuple positions to None
  
      e.g. suppose group_attribute references the second position in the group tuple, then
      we project ('g1_value', 'g2_value', 'g3_value') to (None, 'g2_value', None)
      """
      if not group_attribute:
          return group_tuple
  
      assert (
          all_group_attributes
      ), "group_by without grouping, did you specify @define_stats_grouping for event {}?".format(
          event
      )
      assert (
          group_attribute in all_group_attributes
      ), "group {} is not configured for event {}, check @define_stats_grouping".format(
          group_attribute, event
      )
  
      return tuple(
          group_tuple[idx] if group_attribute == g else None
          for idx, g in enumerate(all_group_attributes)
      )
  
imports: from abc import ABC, abstractmethod
  from collections import defaultdict
  from enum import Enum
  from typing import Union, Callable, Dict, Optional, NamedTuple, List, Type, TypeVar, Tuple, Any
  import numpy
  from maze.core.events.event_record import EventRecord
  from maze.core.events.event_topic_factory import event_topic_factory
label_desc: Use image node_id 12 for calling the LogStatsAggregator obj's underlying member method code with example usage: obj._project_group(cls, group_tuple, group_attribute, all_group_attributes, event) and returns: tuple, group_tuple