code: def get_stride(self):
          
          fftlength = float(self.args.secpfft)
          overlap = fftlength * self.args.overlap
          stride = fftlength - overlap
          nfft = self.duration / stride  # number of FFTs
          ffps = int(nfft / (self.width * 0.8))  # FFTs per second
          if ffps > 3:
              return max(2 * fftlength, ffps * stride + fftlength - 1)
          return None
docs: Calculate the stride for the spectrogram
  
          This method returns the stride as a `float`, or `None` to indicate
          selected usage of `TimeSeries.spectrogram2`.