<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __getStatContainer(cls, context, parent=None):
 """Get the stat container for the given context under the given parent."""

    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