def _check_generated_range(start, periods, freq):
freq = freq.upper()<EOL>gen = date_range(start, periods=periods, freq=freq)<EOL>index = DatetimeIndex(gen.values)<EOL>if not freq.startswith("<STR_LIT>"):<EOL><INDENT>assert frequencies.infer_freq(index) == gen.freqstr<EOL><DEDENT>else:<EOL><INDENT>inf_freq = frequencies.infer_freq(index)<EOL>is_dec_range = inf_freq == "<STR_LIT>" and gen.freqstr in (<EOL>"<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>")<EOL>is_nov_range = inf_freq == "<STR_LIT>" and gen.freqstr in (<EOL>"<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>")<EOL>is_oct_range = inf_freq == "<STR_LIT>" and gen.freqstr in (<EOL>"<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>")<EOL>assert is_dec_range or is_nov_range or is_oct_range<EOL><DEDENT>
Check the range generated from a given start, frequency, and period count.

Parameters
----------
start : str
    The start date.
periods : int
    The number of periods.
freq : str
    The frequency of the range.