def TTDS_TT_shiftlen_weeklyconservation_idx_rule(M):
    """
    Index is (window, tour type, shift length, week) if more than one shift length
    in tour type.

    :param M: Model
    :return: Constraint index rule
    """
    index = []
    for (i, t) in M.okTourType:
        for k in M.tt_length_x[t]:
            if len(M.tt_length_x[t]) > 1:
                for w in M.WEEKS:
                    for d in M.DAYS:
                        if (i, t, k, d) in M.okTourTypeDayShift and (i, t, k, w) not in index:
                            index.append((i, t, k, w))

    return index