code: def get_by_role(
      self, credentials: SyftVerifyKey, role: ServiceRole
  ) -> Result[Optional[User], str]:
      qks = QueryKeys(qks=[RolePartitionKey.with_obj(role)])
      return self.query_one(credentials=credentials, qks=qks)
  
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 8 for calling the UserStash obj's underlying member method code with example usage: obj.get_by_role(credentials, role) and returns: self