code: def update(
      self, credentials: SyftVerifyKey, user: User, has_permission=False
  ) -> Result[User, str]:
      res = self.check_type(user, self.object_type)
      # we dont use and_then logic here as it is hard because of the order of the arguments
      if res.is_err():
          return res
      return super().update(
          credentials=credentials,
          obj=res.ok(),
          has_permission=has_permission,
      )
  
imports: from typing import List
  from typing import Optional
  from result import Ok
  from result import Result
  from ...node.credentials import SyftSigningKey
  from ...node.credentials import SyftVerifyKey
  from ...serde.serializable import serializable
  from ...store.document_store import BaseStash
  from ...store.document_store import DocumentStore
  from ...store.document_store import PartitionKey
  from ...store.document_store import PartitionSettings
  from ...store.document_store import QueryKeys
  from ...store.document_store import UIDPartitionKey
  from ...types.uid import UID
  from ...util.telemetry import instrument
  from ..action.action_permissions import ActionObjectPermission
  from ..response import SyftSuccess
  from .user import User
  from .user_roles import ServiceRole
label_desc: Use image node_id 12 for calling the UserStash obj's underlying member method code with example usage: obj.update(credentials, user, has_permission) and returns: super, res