def index_report(df, label='', time_fmt='%Y-%m-%d %T', return_index_dict=False
    ):
    """Sorts dataframe index, prints index's start and end points and its datetime frequency.
    if return_index_dict=True then it returns these values in a dictionary as well as printing them."""
    import pandas as pd
    df.sort_index(inplace=True)
    index_info = {'index_start': df.index[0].strftime(time_fmt),
        'index_end': df.index[-1].strftime(time_fmt), 'index_freq': df.
        index.freq}
    if df.index.freq is None:
        try:
            index_info['inferred_index_freq'] = pd.infer_freq(df.index)
        except:
            index_info['inferred_index_freq'] = 'error'
    dashes = '---' * 20
    print(dashes)
    print(f'\tINDEX REPORT:\t{label}')
    print(dashes)
    print(
        f"""* Index Endpoints:
	{df.index[0].strftime(time_fmt)} -- to -- {df.index[-1].strftime(time_fmt)}"""
        )
    print(f'* Index Freq:\n\t{df.index.freq}')
    if return_index_dict == True:
        return index_info
    else:
        return
