code: def get_subject_dataset(subject):
      # Consider epochs that start 1s after cue onset.
      tmin, tmax = 1.0, 2.0
      event_id = dict(hands=2, feet=3)
      runs = [6, 10, 14]  # motor imagery: hands vs feet
  
      # Download data with MNE
      raw_files = [
          read_raw_edf(f, preload=True)
          for f in eegbci.load_data(subject, runs)
      ]
      raw = concatenate_raws(raw_files)
  
      # Select only EEG channels
      picks = pick_types(
          raw.info,
          meg=False,
          eeg=True,
          stim=False,
          eog=False,
          exclude="bads",
      )
      # select only nine electrodes: F3, Fz, F4, C3, Cz, C4, P3, Pz, P4
      picks = picks[[31, 33, 35, 8, 10, 12, 48, 50, 52]]
  
      # Apply band-pass filter
      raw.filter(7.0, 35.0, method="iir", picks=picks)
  
      # Check the events
      events, _ = events_from_annotations(
          raw, event_id=dict(T1=2, T2=3)
      )
  
      # Define the epochs
      epochs = Epochs(
          raw,
          events,
          event_id,
          tmin,
          tmax,
          proj=True,
          picks=picks,
          baseline=None,
          preload=True,
          verbose=False,
      )
  
      # Extract the labels for each event
      labels = epochs.events[:, -1] - 2
  
      # Compute covariance matrices on scaled data
      covs = Covariances().fit_transform(1e6 * epochs.get_data())
  
      return covs, labels
  
file_path: pyRiemann/examples/transfer/plot_bci_example.py
imports: import numpy
  from tqdm import tqdm
  from sklearn.pipeline import make_pipeline
  from sklearn.model_selection import StratifiedShuffleSplit
  import matplotlib.pyplot
  from mne import Epochs, pick_types, events_from_annotations
  from mne.io import concatenate_raws
  from mne.io.edf import read_raw_edf
  from mne.datasets import eegbci
  from mne import set_log_level
  from pyriemann.classification import MDM
  from pyriemann.estimation import Covariances
  from pyriemann.transfer import encode_domains, TLDummy, TLCenter, TLClassifier, TLSplitter
label_desc: Use image node_id 1 for calling a global function with example usage: get_subject_dataset(subject) and returns: covs,  labels