docs: def get_package_hashes(
      package,
      version=None,
      algorithm=DEFAULT_ALGORITHM,
      python_versions=(),
      verbose=False,
      include_prereleases=False,
      lookup_memory=None,
      index_url=DEFAULT_INDEX_URL,
  ):
      """
      Gets the hashes for the given package.
  
      >>> get_package_hashes('hashin')
      {
          'package': 'hashin',
          'version': '0.10',
          'hashes': [
              {
                  'url': 'https://pypi.org/packages/[...]',
                  'hash': '45d1c5d2237a3b4f78b4198709fb2ecf[...]'
              },
              {
                  'url': 'https://pypi.org/packages/[...]',
                  'hash': '0d63bf4c115154781846ecf573049324[...]'
              },
              {
                  'url': 'https://pypi.org/packages/[...]',
                  'hash': 'c32e6d9fb09dc36ab9222c4606a1f43a[...]'
              }
          ]
      }
      """
      if lookup_memory is not None and package in lookup_memory:
          data = lookup_memory[package]
      else:
          data = get_package_data(package, index_url, verbose)
      if not version:
          version = get_latest_version(data, include_prereleases)
          assert version
          if verbose:
              _verbose("Latest version for {0} is {1}".format(package, version))
  
      # Independent of how you like to case type it, pick the correct
      # name from the PyPI index.
      package = data["info"]["name"]
  
      try:
          releases = data["releases"][version]
      except KeyError:
          raise PackageError("No data found for version {0}".format(version))
  
      if python_versions:
          releases = filter_releases(releases, python_versions)
  
      if not releases:
          if python_versions:
              raise PackageError(
                  "No releases could be found for "
                  "{0} matching Python versions {1}".format(version, python_versions)
              )
          else:
              raise PackageError("No releases could be found for {0}".format(version))
  
      hashes = list(
          get_releases_hashes(releases=releases, algorithm=algorithm, verbose=verbose)
      )
      return {"package": package, "version": version, "hashes": hashes}