<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def when(self, key):
 """ Specify context, i.e. condition that must be met. Arguments: key (str):
 Name of the context whose value you want to query. Returns: Context: """

        ctx = Context(key, self)
        self.context.append(ctx)
        return ctx