docs: def _resample_obspy(samples, sr, newsr, window='hanning', lowpass=True):
      # type: (np.ndarray, int, int, str, bool) -> np.ndarray
      """
      Resample using Fourier method. The same as resample_scipy but with
      low-pass filtering for upsampling
  
      """
      from scipy.signal import resample
      from math import ceil
      factor = sr/float(newsr)
      if newsr < sr and lowpass:
          # be sure filter still behaves good
          if factor > 16:
              logger.info("Automatic filter design is unstable for resampling "
                          "factors (current sampling rate/new sampling rate) " 
                          "above 16. Manual resampling is necessary.")
          freq = min(sr, newsr) * 0.5 / float(factor)
          logger.debug(f"resample_obspy: lowpass {freq}")
          samples = lowpass_cheby2(samples, freq=freq, sr=sr, maxorder=12)
      num = int(ceil(len(samples) / factor))
  
      return _applyMultichan(samples, 
                             lambda S: resample(S, num, window=window))