def generic_cmp(value1, value2):
    """
    Generic comparator of values which uses the builtin '<' and '>' operators.
    Assumes the values can be compared that way.

    Args:
        value1: The first value
        value2: The second value

    Returns:
        -1, 0, or 1 depending on whether value1 is less, equal, or greater
        than value2
    """

    return -1 if value1 < value2 else 1 if value1 > value2 else 0