code: def update_with_context(
      self, context: NodeServiceContext, obj: Any
  ) -> Union[SyftSuccess, SyftError]:
      if isinstance(context, AuthedServiceContext):
          credentials = context.credentials
      elif isinstance(context, ChangeContext):
          credentials = context.approving_user_credentials
      else:
          return SyftError(message="wrong context passed")
      result = context.node.get_service(self.service_type).stash.update(
          credentials, obj
      )
      return result
  
imports: from typing import Any
  from typing import Optional
  from typing import Type
  from typing import Union
  from typing_extensions import Self
  from ..serde.serializable import serializable
  from ..service.context import AuthedServiceContext
  from ..service.context import ChangeContext
  from ..service.context import NodeServiceContext
  from ..service.response import SyftError
  from ..service.response import SyftSuccess
  from ..types.syft_object import SYFT_OBJECT_VERSION_1
  from ..types.syft_object import SyftObject
  from ..types.uid import UID
label_desc: Use image node_id 4 for calling the LinkedObject obj's underlying member method code with example usage: obj.update_with_context(context, obj) and returns: result, SyftError