def invert_coords(coords, coord_key):
    """Invert coordinates to map labels to values."""
    inv_map = {val: key for key, val in coords[coord_key].items()}
    labels = [inv_map[key] for key in inv_map]
    keys = [key for key in inv_map]
    return labels, keys