def __compare(x, y):
    """
    Parameters
    ----------
    x : comparable
    y : comparable

    Returns
    -------
    result : int
        Returns 1 if x is larger than y, -1 if x is smaller
        then y, 0 if x equals y.
    """
    if x > y:
        return 1
    elif x < y:
        return -1
    else:
        return 0