code: def eeg_power_band(epochs):
      """EEG relative power band feature extraction.
  
      This function takes an ``mne.Epochs`` object and creates EEG features based
      on relative power in specific frequency bands that are compatible with
      scikit-learn.
  
      Parameters
      ----------
      epochs : Epochs
          The data.
  
      Returns
      -------
      X : numpy array of shape [n_samples, 5 * n_channels]
          Transformed data.
      """
      # specific frequency bands
      FREQ_BANDS = {
          "delta": [0.5, 4.5],
          "theta": [4.5, 8.5],
          "alpha": [8.5, 11.5],
          "sigma": [11.5, 15.5],
          "beta": [15.5, 30],
      }
  
      spectrum = epochs.compute_psd(picks="eeg", fmin=0.5, fmax=30.0)
      psds, freqs = spectrum.get_data(return_freqs=True)
      # Normalize the PSDs
      psds /= np.sum(psds, axis=-1, keepdims=True)
  
      X = []
      for fmin, fmax in FREQ_BANDS.values():
          psds_band = psds[:, :, (freqs >= fmin) & (freqs < fmax)].mean(
              axis=-1
          )
          X.append(psds_band.reshape(len(psds), -1))
  
      return np.concatenate(X, axis=1)
  
file_path: mne-python/tutorials/clinical/60_sleep.py
imports: import matplotlib.pyplot
  import numpy
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.metrics import accuracy_score, classification_report, confusion_matrix
  from sklearn.pipeline import make_pipeline
  from sklearn.preprocessing import FunctionTransformer
  import mne
  from mne.datasets.sleep_physionet.age import fetch_data
label_desc: Use image node_id 1 for calling a global function with example usage: eeg_power_band(epochs) and returns: np