def EnterOpContext(op):
 @contextmanager
 def _ContextManager(op):
  with OpContext():
   with OpContext.current().Enter(op):
    (yield)
 return stack_context.StackContext(partial(_ContextManager, op))

def EnterOpContext ( op ) : @ contextmanager def _ContextManager ( op ) : with OpContext ( ) : with OpContext . current ( ) . Enter ( op ) : ( yield ) return stack_context . StackContext ( partial ( _ContextManager , op ) )
returns a stackcontext that when entered .