code: def _compute_expected_results(
      X,
      y=None,
      n_coefs=None,
      drop_sum=False,
      anova=False,
      norm_mean=False,
      norm_std=False,
  ):
      """Compute the expected results."""
      X = np.asarray(X)
      n_samples, n_timestamps = X.shape
      if norm_mean:
          X -= X.mean(axis=1)[:, None]
      if norm_std:
          X /= X.std(axis=1)[:, None]
      X_fft = np.fft.rfft(X)
      X_fft = np.vstack([np.real(X_fft), np.imag(X_fft)])
      if n_timestamps % 2 == 0:
          X_fft = X_fft.reshape(n_samples, n_timestamps + 2, order="F")
          X_fft = np.c_[X_fft[:, 0], X_fft[:, 2:-1]]
      else:
          X_fft = X_fft.reshape(n_samples, n_timestamps + 1, order="F")
          X_fft = np.c_[X_fft[:, 0], X_fft[:, 2:]]
      if drop_sum:
          X_fft = X_fft[:, 1:]
      if n_coefs is None:
          return X_fft
      else:
          if anova:
              _, p = f_classif(X_fft, y)
              support = np.argsort(p)[:n_coefs]
              return X_fft[:, support]
          else:
              return X_fft[:, :n_coefs]
  
file_path: pyts/pyts/approximation/tests/test_dft.py
imports: import numpy
  import pytest
  import re
  from sklearn.feature_selection import f_classif
  from pyts.approximation import DiscreteFourierTransform
label_desc: Use image node_id 1 for calling a global function with example usage: _compute_expected_results(X, y, n_coefs, drop_sum, anova, norm_mean, norm_std) and returns: X_fft, X_fft, X_fft