def data_resample(df, sample_time='1T'):
    """
        This function downsamples a sample-time indexed pandas dataframe containing measurement channel values based
        on the sample time supplied. It uses the mean of the values within the resolution interval. It uses the pandas
        dataframe module `df.resample`

        Parameters
        ----------
        df :
            `df` is a sample-time indexed pandas dataframe containing measurement values from the different channels of
            each meter.
        sample_time :
            `sample_time` determines the desired resolution of the downsampled data. For 1 minute - 1T, 1 hour - 1H,
            1 month - 1M, 1 Day - 1D etc. The default chosen here is 1 minute.

        Returns
        -------
        Dataframe
            Resampled-time indexed pandas dataframe containing downsampled measurement values from the given dataframe.
        """
    # Data is downsampled using the mean of the values within the interval of the sample time provided.
    # The mean is used because it provided the average/expected value of the measurement within that time range.
    df_resampled = df.resample(sample_time, closed="left", label="right").mean()

    return df_resampled