def normalize_time(time_format, time_duration):
    """
        Takes a 'time_format' tuple and a 'time_duration' list and calculates the proper duration of time_duration so it respects time_format specifications
    """
    if not time_format or not time_duration:
        raise RuntimeError("Mising or 'None' arguments")
    if len(time_duration) != len(time_format):
        raise RuntimeError(
            'Time format and duration must have the same number of components')
    for i in range(len(time_duration)):
        if time_duration[i] > time_format[i]:
            if i == len(time_duration) - 1:
                continue
            time_duration[i + 1] += time_duration[i] // time_format[i]
            time_duration[i] = time_duration[i] % time_format[i]
    return time_duration, time_format
