code: def _get_best_freq_band(
      all_class_dis, n_subband, subband_fmin, subband_fmax, alpha
  ):
      """Private function to select frequency bands whose class dis value are
      higher than the user-specific threshold."""
  
      fmaxstart = np.argmax(all_class_dis)
  
      fmin = np.min(all_class_dis)
      fmax = np.max(all_class_dis)
      threshold_freq = fmax - (fmax - fmin) * alpha
  
      f0 = fmaxstart
      f1 = fmaxstart
      while f0 >= 1 and (all_class_dis[f0 - 1] >= threshold_freq):
          f0 = f0 - 1
  
      while f1 < n_subband - 1 and (
          all_class_dis[f1 + 1] >= threshold_freq
      ):
          f1 = f1 + 1
  
      best_freq_f0 = subband_fmin[f0]
      best_freq_f1 = subband_fmax[f1]
      best_freq = [best_freq_f0, best_freq_f1]
  
      return best_freq
  
imports: import numpy
  from mne import Epochs, events_from_annotations
  from pyriemann.estimation import Covariances
  from pyriemann.classification import class_distinctiveness
label_desc: Use image node_id 3 for calling a global function with example usage: _get_best_freq_band(all_class_dis, n_subband, subband_fmin, subband_fmax, alpha) and returns: best_freq