def _rescale_forecast(forecast, 
                      history, 
                      cols_rescale=['forecast', 
                                    'forecast_lower', 'forecast_upper']):
  """Internal function to return a rescaled forecast resulting from a scaled
     history. 

  Parameters
  ----------
  history: the history that generated the forecast
      
  Returns
  -------
  The forecast pd dataframe with the forecast columns rescaled"""
  hist_mean = history['actual'].mean()
  hist_std = history['actual'].std()
  for col_rescale in cols_rescale:
    forecast[col_rescale] = forecast[col_rescale] * hist_std + hist_mean

  return forecast