code: def get_upstream(repo: Repo) -> Remote:
      
      for remote in repo.remotes:
          for url in remote.urls:
              if url.endswith("pytest-dev/pluggy.git"):
                  return remote
      raise RuntimeError("could not find tox-dev/tox.git remote")
docs: Find upstream repository for pluggy on the remotes