code: def _get_historic_means(self, timeSeries):
          
          # calculate the history values
          historyLength = self._historyLength
          historicMeans = []
          append        = historicMeans.append
  
          # not most optimized loop in case of calculation operations
          for startIdx in xrange(len(timeSeries) - historyLength - 1):
              value = 0
              for idx in xrange(startIdx, startIdx + historyLength):
                  value += abs(timeSeries[idx+1][1] - timeSeries[idx][1])
  
              append(value / float(historyLength))
  
          return historicMeans
docs: Calculates the mean value for the history of the MeanAbsoluteScaledError.
  
          :param TimeSeries timeSeries:    Original TimeSeries used to calculate the mean historic values.
  
          :return:    Returns a list containing the historic means.
          :rtype: list