code: def _mft(
      X,
      window_size,
      dft_length,
      norm,
      support,
      anova,
      variance,
      inverse_sqrt_win_size,
      lower_bounding,
  ):
      start_offset = 2 if norm else 0
      length = dft_length + start_offset + dft_length % 2
      end = max(1, len(X[0]) - window_size + 1)
  
      #  compute mask for only those indices needed and not all indices
      if anova or variance:
          support = support + start_offset
          indices = np.full(length, False)
          mask = np.full(length, False)
          for s in support:
              indices[s] = True
              mask[s] = True
              if (s % 2) == 0:  # even
                  indices[s + 1] = True
              else:  # uneven
                  indices[s - 1] = True
          mask = mask[indices]
      else:
          indices = np.full(length, True)
  
      phis = _get_phis(window_size, length)
      transformed = np.zeros((X.shape[0], end, length))
  
      # 1. First run using DFT
      with objmode(X_ffts="complex128[:,:]"):
          X_ffts = np.fft.rfft(X[:, :window_size], axis=1)  # complex128
      reals = np.real(X_ffts)  # float64[]
      imags = np.imag(X_ffts)  # float64[]
      transformed[:, 0, 0::2] = reals[:, 0 : length // 2]
      transformed[:, 0, 1::2] = imags[:, 0 : length // 2]
  
      # 2. Other runs using MFT
      # X2 = X.reshape(X.shape[0], X.shape[1], 1)
      # Bugfix to allow for slices on original X like in TEASER
      X2 = X.copy().reshape(X.shape[0], X.shape[1], 1)
  
      # compute only those indices needed and not all
      phis2 = phis[indices]
      transformed2 = transformed[:, :, indices]
      for i in range(1, end):
          reals = (
              transformed2[:, i - 1, 0::2]
              + X2[:, i + window_size - 1]
              - X2[:, i - 1]
          )
          imags = transformed2[:, i - 1, 1::2]
          transformed2[:, i, 0::2] = (
              reals * phis2[:length:2]
              - imags * phis2[1 : (length + 1) : 2]
          )
          transformed2[:, i, 1::2] = (
              reals * phis2[1 : (length + 1) : 2]
              + phis2[:length:2] * imags
          )
  
      transformed2 = transformed2 * inverse_sqrt_win_size
  
      if lower_bounding:
          transformed2[:, :, 1::2] = transformed2[:, :, 1::2] * -1
  
      # compute STDs
      stds = np.zeros((X.shape[0], end))
      for a in range(X.shape[0]):
          stds[a] = _calc_incremental_mean_std(X[a], end, window_size)
  
      # divide all by stds and use only the best indices
      if anova or variance:
          return transformed2[:, :, mask] / stds.reshape(
              stds.shape[0], stds.shape[1], 1
          )
      else:
          return (
              transformed2
              / stds.reshape(stds.shape[0], stds.shape[1], 1)
          )[:, :, start_offset:]
  
file_path: sktime/sktime/transformations/panel/dictionary_based/_sfa_fast_numba.py
imports: import math
  from warnings import simplefilter
  import numpy
  from sktime.utils.numba.njit import njit
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 9 for calling a global function with example usage: _mft(X, window_size, dft_length, norm, support, anova, variance, inverse_sqrt_win_size, lower_bounding) and returns: unknown, unknown