def METHOD_NAME(maven_install: dict) -> dict:
  """Convert raw maven lock file into a dict keyed by bazel package names.
  Args:
    maven_install: raw maven lock file data
  Returns:
    dict keyed by names created by rules_jvm_external
  """
  # Map repo coordinate back to the download repository.
  # The input dict is of the form
  # "https//repo1.maven.org/": [ com.google.foo:some.package, ...]
  # But.... sometimes the artifact is
  #    com.google.foo:some.package.jar.arch
  # and then  that means the artifact table has an entry
  # in their shasums table keyed by arch.
  repo_to_url = {}
  for url, repos in maven_install["repositories"].items():
    for repo in repos:
      if repo in repo_to_url:
        print(
            "WARNING: Duplicate download path for <%s>. Using %s"
            % (repo, repo_to_url[repo])
        )
        continue
      repo_to_url[repo] = url
  ret = {}
  for name, info in maven_install["artifacts"].items():
    repo, artifact = name.split(":")
    version = info["version"]
    for arch in info["shasums"].keys():
      # build the download URL
      sub_version = version
      repo_name = name
      if arch != "jar":
        sub_version = version + "-" + arch
        repo_name = "%s:jar:%s" % (name, arch)
      url = (
          "{mirror}{repo}/{artifact}/{version}/{artifact}-{version}.jar".format(
              mirror=repo_to_url[repo_name],
              repo=repo.replace(".", "/"),
              artifact=artifact,
              version=version,
          )
      )
      tmp = info.copy()
      tmp["maven_name"] = name
      tmp["url"] = url
      bazel_name = maven_to_bazel(name) + "_" + maven_to_bazel(sub_version)
      ret[bazel_name] = tmp
      if arch == "jar":
        ret[bazel_name] = tmp
  return ret