def _urls(package, version, mirrors):
    """Computes the urls from which an archive of the provided PyPI package and
    version should be downloaded.

     Args:
        package: PyPI package name.
        version: version for which the archive should be downloaded.
        mirrors: dictionary of mirrors, see mirrors.bzl in this directory for
            an example.
    """
    return [
        x.format(
            p = package[:1],
            package = package,
            version = version,
        )
        for x in mirrors.get("pypi")
    ]