def format_interval(time_in_seconds):
    """ Format seconds into human readable format.

    Parameters
    ----------
    time_in_seconds : float

    Returns
    -------
    str
        Formated time.
    """
    mins, seconds = divmod(int(time_in_seconds), 60)
    hours, minutes = divmod(mins, 60)

    if 0 > hours:
        return '{:0>2d}:{:0>2d}:{:0>2d}'.format(hours, minutes, seconds)

    return '{:0>2d}:{:0>2d}'.format(minutes, seconds)
dataset/ETHPy150Open itdxer/neupy/neupy/helpers/progressbar.py/format_interval/swapped operands of `>`