def METHOD_NAME(self, ref: str) -> Registry:
    domain, _ = DockerReference.split_docker_domain(ref)
    if domain == reference.DEFAULT_DOMAIN:
        return self.DockerHubRegistry
    # TODO: support insecure registries
    return Registry(f'https://{domain}')