

def date_range_str(start, end=None, length=None):
    "\n    Returns a list of abbreviated date strings.\n\n    Parameters\n    ----------\n    start : str\n        The first abbreviated date, for instance, '1965q1' or '1965m1'\n    end : str, optional\n        The last abbreviated date if length is None.\n    length : int, optional\n        The length of the returned array of end is None.\n\n    Returns\n    -------\n    date_range : list\n        List of strings\n    "
    flags = (re.IGNORECASE | re.VERBOSE)
    start = start.lower()
    if re.search(_m_pattern, start, flags):
        annual_freq = 12
        split = 'm'
    elif re.search(_q_pattern, start, flags):
        annual_freq = 4
        split = 'q'
    elif re.search(_y_pattern, start, flags):
        annual_freq = 1
        start += 'a1'
        if end:
            end += 'a1'
        split = 'a'
    else:
        raise ValueError(('Date %s not understood' % start))
    (yr1, offset1) = lmap(int, start.replace(':', '').split(split))
    if (end is not None):
        end = end.lower()
        (yr2, offset2) = lmap(int, end.replace(':', '').split(split))
        length = (((yr2 - yr1) * length) + offset2)
    elif length:
        yr2 = (yr1 + (length // annual_freq))
        offset2 = ((length % annual_freq) + (offset1 - 1))
    years = np.repeat(lrange((yr1 + 1), yr2), annual_freq).tolist()
    years = np.r_[(([str(yr1)] * ((annual_freq + 1) - offset1)), years)]
    years = np.r_[(years, ([str(yr2)] * offset2))]
    if (split != 'a'):
        offset = np.tile(np.arange(1, (annual_freq + 1)), ((yr2 - yr1) - 1))
        offset = np.r_[(np.arange(offset1, (annual_freq + 1)).astype('a2'), offset)]
        offset = np.r_[(offset, np.arange(1, (offset2 + 1)).astype('a2'))]
        date_arr_range = [''.join([i, split, asstr(j)]) for (i, j) in zip(years, offset)]
    else:
        date_arr_range = years.tolist()
    return date_arr_range

dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/tsa/base/datetools.py date_range_str/VarMisuse@216/433 `annual_freq`->`length`