code: def _load_data(kind):
      """Load data."""
      # It is more memory efficient to load data in a separate
      # function so it's loaded on-demand
      raw = read_raw_fif(raw_fname)
      events = read_events(event_name)
      # subselect channels for speed
      if kind == "eeg":
          picks = pick_types(raw.info, meg=False, eeg=True, exclude=[])[
              :15
          ]
          epochs = Epochs(
              raw,
              events,
              event_id,
              tmin,
              tmax,
              picks=picks,
              preload=True,
              reject=dict(eeg=80e-6),
          )
      else:
          picks = pick_types(raw.info, meg=True, eeg=False, exclude=[])[
              1:200:2
          ]
          assert kind == "meg"
          with pytest.warns(RuntimeWarning, match="projection"):
              epochs = Epochs(
                  raw,
                  events,
                  event_id,
                  tmin,
                  tmax,
                  picks=picks,
                  preload=True,
                  reject=dict(grad=1000e-12, mag=4e-12),
              )
      return raw, epochs
  
imports: from itertools import compress
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  from mne import Epochs, pick_channels, pick_types, read_events
  from mne._fiff.constants import FIFF
  from mne._fiff.proj import _has_eeg_average_ref_proj
  from mne.channels import make_dig_montage
  from mne.channels.interpolation import _make_interpolation_matrix
  from mne.datasets import testing
  from mne.io import RawArray, read_raw_ctf, read_raw_fif, read_raw_nirx
  from mne.preprocessing.nirs import beer_lambert_law, optical_density, scalp_coupling_index
  from mne.utils import _record_warnings
label_desc: Use image node_id 1 for calling a global function with example usage: _load_data(kind) and returns: raw,  epochs