code: def set_fft_params(func):
      
      @wraps(func)
      def wrapped_func(series, method_func, *args, **kwargs):
          """Wrap function to normalize FFT params before execution
          """
          if isinstance(series, tuple):
              data = series[0]
          else:
              data = series
  
          # normalise FFT parmeters for all libraries
          normalize_fft_params(data, kwargs=kwargs, func=method_func)
  
          return func(series, method_func, *args, **kwargs)
  
      return wrapped_func
docs: Decorate a method to automatically convert quantities to samples