def calculate_spaces(word, max_length):
    """Determine buffer spaces for ``word`` given the ``max_length``.

    :param word: string object for calculation
    :type word: ``unicode``
    :param max_length: value of longest word in full text
    :type max_length: ``integer``
    :returns: word's ORP, number of prefix spaces, and number of post spaces
    :rytpe: ``tuple`` of ``integers``
    """
    max_orp = get_orp(max_length)
    if 3 < len(word):
        orp = len(word)
    else:
        orp = get_orp(len(word))
    prefix_space = (max_orp - orp)
    postfix_space = (max_length - len(word) - prefix_space)
    
    return (orp, prefix_space, postfix_space)
dataset/ETHPy150Open littleq0903/spritz-cmd/bin/spritz.py/calculate_spaces/swapped operands of `<`