code: def _test_concat(reader, *args):
      """Test concatenation of raw classes that allow not preloading."""
      data = None
  
      for preload in (True, False):
          raw1 = reader(*args, preload=preload)
          raw2 = reader(*args, preload=preload)
          raw1.append(raw2)
          raw1.load_data()
          if data is None:
              data = raw1[:, :][0]
          assert_allclose(data, raw1[:, :][0])
  
      for first_preload in (True, False):
          raw = reader(*args, preload=first_preload)
          data = raw[:, :][0]
          for preloads in ((True, True), (True, False), (False, False)):
              for last_preload in (True, False):
                  t_crops = raw.times[
                      np.argmin(np.abs(raw.times - 0.5)) + [0, 1]
                  ]
                  raw1 = raw.copy().crop(0, t_crops[0])
                  if preloads[0]:
                      raw1.load_data()
                  raw2 = raw.copy().crop(t_crops[1], None)
                  if preloads[1]:
                      raw2.load_data()
                  raw1.append(raw2)
                  if last_preload:
                      raw1.load_data()
                  assert_allclose(data, raw1[:, :][0])
  
imports: import math
  import os
  import re
  from contextlib import redirect_stdout
  from io import StringIO
  from os import path
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_array_less
  import mne
  from mne import Annotations, concatenate_raws, create_info, pick_types
  from mne._fiff._digitization import DigPoint, _dig_kind_dict
  from mne._fiff.constants import FIFF
  from mne._fiff.meas_info import Info, _get_valid_units, _writing_info_hdf5
  from mne._fiff.pick import _ELECTRODE_CH_TYPES, _FNIRS_CH_TYPES_SPLIT
  from mne._fiff.proj import Projection
  from mne._fiff.utils import _mult_cal_one
  from mne.fixes import _numpy_h5py_dep
  from mne.io import BaseRaw, RawArray, read_raw_fif
  from mne.io.base import _get_scaling
  from mne.transforms import Transform
  from mne.utils import _import_h5io_funcs, _raw_annot, _stamp_to_dt, _TempDir, catch_logging, check_version, object_diff
label_desc: Use image node_id 6 for calling a global function with example usage: _test_concat(reader) without return types