def gen_duration(seconds: int) -> str:
    """Generate a human readable time from seconds."""
    if type(seconds) == float:
        seconds = round(seconds)

    minutes, seconds = divmod(seconds, 60)
    hours, minutes = divmod(minutes, 60)

    return f'{hours:02}:{minutes:02}:{seconds:02}' if hours else f'{minutes:02}:{seconds:02}'