code: def find_dominant_window_sizes(X, offset=0.05):
      """Determine the Window-Size using dominant FFT-frequencies.
  
      Parameters
      ----------
      X : array-like, shape=[n]
          a single univariate time series of length n
      offset : float
          Exclusion Radius
  
      Returns
      -------
      trivial_match: bool
          If the candidate change point is a trivial match
      """
      fourier = np.absolute(np.fft.fft(X))
      freqs = np.fft.fftfreq(X.shape[0], 1)
  
      coefs = []
      window_sizes = []
  
      for coef, freq in zip(fourier, freqs):
          if coef and freq > 0:
              coefs.append(coef)
              window_sizes.append(1 / freq)
  
      coefs = np.array(coefs)
      window_sizes = np.asarray(window_sizes, dtype=np.int64)
  
      idx = np.argsort(coefs)[::-1]
      for window_size in window_sizes[idx]:
          if window_size not in range(20, int(X.shape[0] * offset)):
              continue
  
          return int(window_size / 2)
  
file_path: sktime/sktime/annotation/clasp.py
imports: from sktime.annotation.base import BaseSeriesAnnotator
  from queue import PriorityQueue
  import numpy
  import pandas
  from sktime.transformations.series.clasp import ClaSPTransformer
  from sktime.utils.validation.series import check_series
label_desc: Use image node_id 1 for calling a global function with example usage: find_dominant_window_sizes(X, offset) and returns: int