code: def add_context(self, name, indices, level=None):
          
  
          self._validate_context((name, indices))
  
          if level is None:
              level = len(self.contexts_ranked)
          self.contexts_ranked.insert(level, name)
          self.contexts[name] = indices
docs: Add a new context level to the hierarchy.
  
          By default, new contexts are added to the lowest level of the hierarchy.
          To insert the context elsewhere in the hierarchy, use the ``level``
          argument. For example, ``level=0`` would insert the context at the
          highest level of the hierarchy.
  
          Parameters
          ----------
          name : str
          indices : list
              Token indices at which each chunk in the context begins.
          level : int
              Level in the hierarchy at which to insert the context. By default,
              inserts context at the lowest level of the hierarchy