@staticmethod
def _compare(x, y):
    """Method equivalent to the Python 2 'cmp'. Note that (x > y) - (x <
    y) is equivalent but not as performant since it would not
    short-circuit.

        """
    if x == y:
        return 0
    elif x > y:
        return 1
    else:
        return -1
