def push_context(ctx):
 _local.__dict__.setdefault('stack', []).append(ctx)

def push_context ( ctx ) : _local . __dict__ . setdefault ( 'stack' , [ ] ) . append ( ctx )
pushes a new context to the current stack .