code: def load_data(
      subject,
      path=None,
      force_update=False,
      update_path=None,
      verbose=None,
  ):
      """Fetch subjects epochs data for the LIMO data set.
  
      Parameters
      ----------
      subject : int
          Subject to use. Must be of class ìnt in the range from 1 to 18.
      path : str
          Location of where to look for the LIMO data.
          If None, the environment variable or config parameter
          ``MNE_DATASETS_LIMO_PATH`` is used. If it doesn't exist, the
          "~/mne_data" directory is used.
      force_update : bool
          Force update of the dataset even if a local copy exists.
      update_path : bool | None
          If True, set the MNE_DATASETS_LIMO_PATH in mne-python
          config to the given path. If None, the user is prompted.
      %(verbose)s
  
      Returns
      -------
      epochs : instance of Epochs
          The epochs.
      """  # noqa: E501
      pd = _check_pandas_installed()
      # subject in question
      if isinstance(subject, int) and 1 <= subject <= 18:
          subj = "S%i" % subject
      else:
          raise ValueError(
              "subject must be an int in the range from 1 to 18"
          )
  
      # set limo path, download and decompress files if not found
      limo_path = data_path(subject, path, force_update, update_path)
  
      # -- 1) import .mat files
      # epochs info
      fname_info = op.join(limo_path, subj, "LIMO.mat")
      data_info = loadmat(fname_info)
      # number of epochs per condition
      design = data_info["LIMO"]["design"][0][0]["X"][0][0]
      data_info = data_info["LIMO"]["data"][0][0][0][0]
      # epochs data
      fname_eeg = op.join(limo_path, subj, "Yr.mat")
      data = loadmat(fname_eeg)
  
      # -- 2) get epochs information from structure
      # sampling rate
      sfreq = data_info["sampling_rate"][0][0]
      # tmin and tmax
      tmin = data_info["start"][0][0]
      # create events matrix
      sample = np.arange(len(design))
      prev_id = np.zeros(len(design))
      ev_id = design[:, 1]
      events = np.array([sample, prev_id, ev_id]).astype(int).T
      # event ids, such that Face B == 1
      event_id = {"Face/A": 0, "Face/B": 1}
  
      # -- 3) extract channel labels from LIMO structure
      # get individual labels
      labels = data_info["chanlocs"]["labels"]
      labels = [label for label, *_ in labels[0]]
      # get montage
      montage = make_standard_montage("biosemi128")
      # add external electrodes (e.g., eogs)
      ch_names = montage.ch_names + ["EXG1", "EXG2", "EXG3", "EXG4"]
      # match individual labels to labels in montage
      found_inds = [
          ind for ind, name in enumerate(ch_names) if name in labels
      ]
      missing_chans = [name for name in ch_names if name not in labels]
      assert labels == [ch_names[ind] for ind in found_inds]
  
      # -- 4) extract data from subjects Yr structure
      # data is stored as channels x time points x epochs
      # data['Yr'].shape  # <-- see here
      # transpose to epochs x channels time points
      data = np.transpose(data["Yr"], (2, 0, 1))
      # initialize data in expected order
      temp_data = np.empty(
          (data.shape[0], len(ch_names), data.shape[2])
      )
      # copy over the non-missing data
      for source, target in enumerate(found_inds):
          # avoid copy when fancy indexing
          temp_data[:, target, :] = data[:, source, :]
      # data to V (to match MNE's format)
      data = temp_data / 1e6
      # create list containing channel types
      types = [
          "eog" if ch.startswith("EXG") else "eeg" for ch in ch_names
      ]
  
      # -- 5) Create custom info for mne epochs structure
      # create info
      info = create_info(ch_names, sfreq, types).set_montage(montage)
      # get faces and noise variables from design matrix
      event_list = list(events[:, 2])
      faces = ["B" if event else "A" for event in event_list]
      noise = list(design[:, 2])
      # create epochs metadata
      metadata = {"face": faces, "phase-coherence": noise}
      metadata = pd.DataFrame(metadata)
  
      # -- 6) Create custom epochs array
      epochs = EpochsArray(
          data,
          info,
          events,
          tmin,
          event_id,
          metadata=metadata,
          verbose=False,
      )
      epochs.info[
          "bads"
      ] = missing_chans  # missing channels are marked as bad.
  
      return epochs
  
file_path: mne-python/mne/datasets/limo/limo.py
imports: import os.path
  import time
  from pathlib import Path
  import numpy
  from scipy.io import loadmat
  from ..._fiff.meas_info import create_info
  from ...channels import make_standard_montage
  from ...epochs import EpochsArray
  from ...utils import _check_pandas_installed, logger, verbose
  from ..utils import _do_path_update, _downloader_params, _get_path, _log_time_size
label_desc: Use image node_id 2 for calling a global function with example usage: load_data(subject, path, force_update, update_path, verbose) and returns: epochs