def A_is_one_wkend_days_init(M, i, w, t, e):
    """
    Initialize indicator for each weekend worked pattern as to whether each week is
    sandwiched by consec weekend days worked.

    :param M: Model
    :param i: weekend worked pattern
    :param w: week
    :param t: tour type
    :param e: weekend type (1=Sun and Sat, 2=Fri and Sat)
    :return: 1 if True, 0 if False
    """

    if e == 1:
        if (M.A_wkend_days[i, 1, w, t, e] + M.A_wkend_days[i, 7, w, t, e]) == 1:
            return 1
        else:
            return 0

    else:
        if (M.A_wkend_days[i, 6, w, t, e] + M.A_wkend_days[i, 7, w, t, e]) == 1:
            return 1
        else:
            return 0