def METHOD_NAME() -> Dict[str, int]:
    """Return a mapping from partition name to partition index."""
    index_map = {}
    try:
        endpoints = Loader().load_data("endpoints")
    except Exception:
        pass
    else:
        for idx, partition in enumerate(endpoints.get("partitions", [])):
            regions = partition.get("regions", {}).keys()
            if "us-east-1" in regions:
                index_map["aws"] = idx
            elif "us-gov-west-1" in regions:
                index_map["aws-us-gov"] = idx
            elif "cn-north-1" in regions:
                index_map["aws-cn"] = idx
    return index_map