def convert_sec_to_time(duration_in_sec: float):
    """converts time in seconds to HH:MM:SS

    Args:
        duration_in_sec (float): duration in seconds

    Returns:
        (str): the time in the format: HH:MM:SS
    """
    hours = int(duration_in_sec/3600)
    remainder = duration_in_sec%3600
    minutes = int(remainder/60)
    seconds = int(duration_in_sec%60)

    return f"{hours:02d}:{minutes:02d}:{seconds:02d}"