code: def number_peaks(self, x, n=None):
          
          if n is None:
              n = 5
          peaks = feature_calculators.number_peaks(x, n)
          logging.debug("agg linear trend by tsfresh calculated")
          return peaks
docs: As in tsfresh `number_peaks <https://github.com/blue-yonder/tsfresh/blob/master/tsfresh/feature_extraction/\
              feature_calculators.py#L1003>`_
              
              Calculates the number of peaks of at least support n in the time series x. A peak of support n is defined \
              as a subsequence of x where a value occurs, which is bigger than its n neighbours to the left and to the right.
  
              Hence in the sequence
  
              >>> x = [3, 0, 0, 4, 0, 0, 13]
  
              4 is a peak of support 1 and 2 because in the subsequences
  
              >>> [0, 4, 0]
              >>> [0, 0, 4, 0, 0]
  
              4 is still the highest value. Here, 4 is not a peak of support 3 because 13 is the 3th neighbour to the \
              right of 4 and its bigger than 4.
  
              :param x: the time series to calculate the feature of
              :type x: pandas.Series
              :param n: the support of the peak
              :type n: int
              :return: the value of this feature
              :rtype: float