<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_upstream(repo: Repo) -> Remote: """Find upstream repository for pluggy on the remotes"""

    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")