def human_seconds(interval):
    """Formats interval, a number of seconds, as a human-readable time
    interval using English words.
    """
    units = [
        (1, u'second'),
        (60, u'minute'),
        (60, u'hour'),
        (24, u'day'),
        (7, u'week'),
        (52, u'year'),
        (10, u'decade'),
    ]
    for i in range(len(units) - 1):
        increment, suffix = units[i]
        next_increment, _ = units[i + 1]
        interval /= float(increment)
        if interval < next_increment:
            break
    else:
        # Last unit.
        increment, suffix = units[-1]
        interval /= float(increment)

    return (interval, suffix) % u"%3.1f %ss"
dataset/ETHPy150Open beetbox/beets/beets/ui/__init__.py/human_seconds/swapped operands of `%`