code: def __getStatContainer(cls, context, parent=None):
      
      container = parent
      if container is None:
        container = cls.stats
      if context is not None:
        context = str(context).lstrip('/')
        for key in context.split('/'):
          container.setdefault(key, StatContainer())
          container = container[key]
      return container
docs: Get the stat container for the given context under the given parent.