def METHOD_NAME(cube: Cube) -> Cube:
    """Given a cube with a probability threshold, invert the probabilities
    relative to the existing thresholding inequality. Update the coordinate
    metadata to indicate the new threshold inequality.
    Args:
        cube:
            A probability cube with a threshold coordinate.
    Returns:
        Cube with the probabilities inverted relative to the input thresholding
        inequality.
    Raises:
        ValueError: If no threshold coordinate is found.
    """
    try:
        threshold = cube.coord(var_name="threshold")
    except CoordinateNotFoundError:
        raise ValueError(
            "Cube does not have a threshold coordinate, probabilities "
            "cannot be inverted if present."
        )
    comparison_operator_lookup = comparison_operator_dict()
    inequality = threshold.attributes["spp__relative_to_threshold"]
    (inverse,) = set(
        [
            value.inverse
            for key, value in comparison_operator_lookup.items()
            if value.spp_string == inequality
        ]
    )
    new_inequality = comparison_operator_lookup[inverse].spp_string
    inverted_probabilities = cube.copy(data=(1.0 - cube.data))
    inverted_probabilities.coord(threshold).attributes[
        "spp__relative_to_threshold"
    ] = new_inequality
    new_name = (
        cube.name().replace("above", "below")
        if "above" in cube.name()
        else cube.name().replace("below", "above")
    )
    inverted_probabilities.rename(new_name)
    return inverted_probabilities