async def METHOD_NAME(
    self,
    profile: Profile,
    did: Union[str, DID],
    service_accept: Optional[Sequence[Text]] = None,
    *,
    timeout: Optional[int] = None,
) -> Tuple[BaseDIDResolver, dict]:
    """Retrieve doc and return with resolver.
    This private method enables the public resolve and resolve_with_metadata
    methods to share the same logic.
    """
    if isinstance(did, DID):
        did = str(did)
    else:
        DID.validate(did)
    for resolver in await self._match_did_to_resolver(profile, did):
        try:
            LOGGER.debug("Resolving DID %s with %s", did, resolver)
            document = await asyncio.wait_for(
                resolver.resolve(
                    profile,
                    did,
                    service_accept,
                ),
                timeout if timeout is not None else self.DEFAULT_TIMEOUT,
            )
            return resolver, document
        except DIDNotFound:
            LOGGER.debug("DID %s not found by resolver %s", did, resolver)
    raise DIDNotFound(f"DID {did} could not be resolved")