def ensure_tz_UTC(df):
    """
        Function to ensure that the tzinfo of a data frame is in UTC

        :param df: a pandas data frame with datetime_index
        :returns: the dataframe with df.index.tzinfo='UTC'
    """
    # ensure tzinfo is in UTC
    if (str(df.index.tzinfo)=='None'):
        #print('The time stamp is provided is tz naive. It is assumed that the times provided are in UTC')
        df=df.tz_localize(tz='UTC')
    else:
        #print('The provided time zone of the data is '+str(df.index.tzinfo)+'. This is now converted to a tz aware time stampe in UTC')
        df.index=df.index.tz_convert('UTC')
    return df