def worker_periods_loads(work_hours, close_time):
    """
    Calculate load in each interval.
    If load > 1 it will replaced with 1.
    :param work_hours: map with intervals and working time in seconds
    :param close_time: model global time to calculate load in the last interval correctly
    :return: a list with values of load
    """
    list_ = [round(v / (k.toInterval - k.fromInterval), 3) if not k.last
             else round(v / (close_time - k.fromInterval), 3)
             for k, v in work_hours.items()]
    for index, item in enumerate(list_):
        if item > 1:
            list_[index] = 1
    return list_