code: def context(self):
          
          parent = _ACTION_CONTEXT.set(self)
          try:
              yield self
          finally:
              _ACTION_CONTEXT.reset(parent)
docs: Create a context manager that ensures code runs within action's context.
  
          The action does NOT finish when the context is exited.