def __enter__(self):
        ctx = self.ctx
        self.stack.append(self.ctx)
        for var, role in self.bindings.iteritems():
            role.assign(getattr(ctx, var))
        return ctx
Activate the context, bind roles to instances defined in the context.
dataset/ETHPy150Open amolenaar/roles/roles/context.py/ManagedContext.__enter__