<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reset(cls):
 """Resets the static state. Should only be called by tests."""

    cls.stats = StatContainer()
    cls.parentMap = {}
    cls.containerMap = {}
    cls.subId = 0
    for stat in gc.get_objects():
      if isinstance(stat, Stat):
        stat._aggregators = {}