code: def undo(
      self, context: AuthedServiceContext, uid: UID, reason: str
  ) -> Union[SyftSuccess, SyftError]:
      result = self.stash.get_by_uid(
          credentials=context.credentials, uid=uid
      )
      if result.is_err():
          return SyftError(
              message=f"Failed to update request: {uid} with error: {result.err()}"
          )
  
      request = result.ok()
      if request is None:
          return SyftError(
              message=f"Request with uid: {uid} does not exists."
          )
  
      context.extra_kwargs["reason"] = reason
      result = request.undo(context=context)
  
      if result.is_err():
          return SyftError(
              message=f"Failed to undo Request: <{uid}> with error: {result.err()}"
          )
  
      link = LinkedObject.with_context(request, context=context)
      message_subject = (
          f"Your request for uid: {uid} has been denied. "
          f"Reason specified by Data Owner: {reason}."
      )
  
      notification = CreateNotification(
          subject=message_subject,
          to_user_verify_key=request.requesting_user_verify_key,
          linked_obj=link,
      )
      send_notification = context.node.get_service_method(
          NotificationService.send
      )
      send_notification(context=context, notification=notification)
  
      return SyftSuccess(message=f"Request {uid} successfully denied !")
  
imports: from typing import Dict
  from typing import List
  from typing import Optional
  from typing import Tuple
  from typing import Union
  from result import Err
  from result import Ok
  from ...serde.serializable import serializable
  from ...store.document_store import DocumentStore
  from ...store.linked_obj import LinkedObject
  from ...types.uid import UID
  from ...util.telemetry import instrument
  from ..action.action_permissions import ActionObjectPermission
  from ..action.action_permissions import ActionPermission
  from ..code.user_code import UserCode
  from ..context import AuthedServiceContext
  from ..notification.notification_service import CreateNotification
  from ..notification.notification_service import NotificationService
  from ..notification.notifications import Notification
  from ..response import SyftError
  from ..response import SyftSuccess
  from ..service import AbstractService
  from ..service import SERVICE_TO_TYPES
  from ..service import TYPE_TO_SERVICE
  from ..service import service_method
  from ..user.user import UserView
  from ..user.user_roles import GUEST_ROLE_LEVEL
  from ..user.user_service import UserService
  from .request import Change
  from .request import Request
  from .request import RequestInfo
  from .request import RequestInfoFilter
  from .request import RequestStatus
  from .request import SubmitRequest
  from .request import UserCodeStatusChange
  from .request_stash import RequestStash
label_desc: Use image node_id 10 for calling the RequestService obj's underlying member method code with example usage: obj.undo(context, uid, reason) and returns: SyftSuccess, SyftError, SyftError, SyftError