code: def context_chain(self) -> List['Context']:
          
          contexts = []
          ctx = self  # type: Optional[Context]
          while ctx is not None:
              contexts.append(ctx)
              ctx = ctx.parent
  
          return contexts
docs: Return a list of contexts starting from this one, its parent and so on.