<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def context_chain(self) -> List['Context']: """Return a list of contexts starting from this one, its parent and so on."""

        contexts = []
        ctx = self  # type: Optional[Context]
        while ctx is not None:
            contexts.append(ctx)
            ctx = ctx.parent

        return contexts