code: def add_user_policy(
      self,
      context: AuthedServiceContext,
      policy_code: Union[SubmitUserPolicy, UserPolicy],
  ) -> Union[SyftSuccess, SyftError]:
      if isinstance(policy_code, SubmitUserPolicy):
          policy_code = policy_code.to(UserPolicy, context=context)
      result = self.stash.set(context.credentials, policy_code)
      if result.is_err():
          return SyftError(message=str(result.err()))
      return SyftSuccess(message="Policy Code Submitted")
  
file_path: PySyft/packages/syft/src/syft/service/policy/policy_service.py
imports: from typing import List
  from typing import Union
  from ...serde.serializable import serializable
  from ...store.document_store import DocumentStore
  from ...types.uid import UID
  from ..context import AuthedServiceContext
  from ..response import SyftError
  from ..response import SyftSuccess
  from ..service import AbstractService
  from ..service import TYPE_TO_SERVICE
  from ..service import service_method
  from .policy import SubmitUserPolicy
  from .policy import UserPolicy
  from .user_policy_stash import UserPolicyStash
label_desc: Use image node_id 3 for calling the PolicyService obj's underlying member method code with example usage: obj.add_user_policy(context, policy_code) and returns: SyftSuccess, SyftError