def _get_window_type(window_type):
    if window_type in (FULL_SAMPLE, ROLLING, EXPANDING):
        return window_type
    elif isinstance(window_type, string_types):
        window_type_up = window_type.upper()

        if ('FULL SAMPLE', 'FULL_SAMPLE') in window_type_up:
            return FULL_SAMPLE
        elif window_type_up == 'ROLLING':
            return ROLLING
        elif window_type_up == 'EXPANDING':
            return EXPANDING

    raise Exception('Unrecognized window type: %s' % window_type)
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/tsa/vector_ar/dynamic.py/_get_window_type/swapped operands of `in`