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: Provide an event topic proxy analogous to the event proxies provided by EventSystem/PubSub. But in contrast
  to the event system, this can be used to inject statistics also on the step, episode and epoch level.
  
  Note that different LogStatsLevel result in different behaviour of the returned event topic proxies!
  
  :param interface_class: The class object of an abstract interface that defines the events as methods.
  :return: A proxy object, dynamically derived from the passed `interface_class`, that can be used to trigger
           events.
docstr_tok: ["Provide","an","event","topic","proxy","analogous","to","the","event","proxies","provided","by","EventSystem\/PubSub",".","But","in","contrast","to","the","event","system",",","this","can","be","used","to","inject","statistics","also","on","the","step",",","episode","and","epoch","level",".","Note","that","different","LogStatsLevel","result","in","different","behaviour","of","the","returned","event","topic","proxies","!",":","param","interface_class",":","The","class","object","of","an","abstract","interface","that","defines","the","events","as","methods",".",":","return",":","A","proxy","object",",","dynamically","derived","from","the","passed","`","interface_class","`",",","that","can","be","used","to","trigger","events","."]
code: def create_event_topic(self, interface_class: Type[T]) -> T:
      """
      Provide an event topic proxy analogous to the event proxies provided by EventSystem/PubSub. But in contrast
      to the event system, this can be used to inject statistics also on the step, episode and epoch level.
  
      Note that different LogStatsLevel result in different behaviour of the returned event topic proxies!
  
      :param interface_class: The class object of an abstract interface that defines the events as methods.
      :return: A proxy object, dynamically derived from the passed `interface_class`, that can be used to trigger
               events.
      """
      return event_topic_factory(interface_class, self.add_event)
  
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 13 for calling the LogStatsAggregator obj's underlying member method code with example usage: obj.create_event_topic(interface_class) and returns: event_topic_factory