def METHOD_NAME(self) -> GitPinnedPackage:
    requested = set(self.revisions)
    if len(requested) == 0:
        requested = {"HEAD"}
    elif len(requested) > 1:
        raise MultipleVersionGitDepsError(self.git, requested)
    return GitPinnedPackage(
        git=self.git,
        revision=requested.pop(),
        warn_unpinned=self.warn_unpinned,
        subdirectory=self.subdirectory,
    )