code: def test_beer_lambert_v_matlab():
      """Compare MNE results to MATLAB toolbox."""
      pymatreader = pytest.importorskip("pymatreader")
      raw = read_raw_nirx(fname_nirx_15_0)
      raw = optical_density(raw)
      raw = beer_lambert_law(raw, ppf=0.121)
      raw._data *= 1e6  # Scale to uM for comparison to MATLAB
  
      matlab_fname = (
          testing_path
          / "NIRx"
          / "nirscout"
          / "validation"
          / "nirx_15_0_recording_bl.mat"
      )
      matlab_data = pymatreader.read_mat(matlab_fname)
  
      for idx in range(raw.get_data().shape[0]):
          mean_error = np.mean(
              matlab_data["data"][:, idx] - raw._data[idx]
          )
          assert mean_error < 0.1
          matlab_name = (
              "S"
              + str(int(matlab_data["sources"][idx]))
              + "_D"
              + str(int(matlab_data["detectors"][idx]))
              + " "
              + matlab_data["type"][idx]
          )
          assert raw.info["ch_names"][idx] == matlab_name
  
file_path: mne-python/mne/preprocessing/nirs/tests/test_beer_lambert_law.py
imports: import numpy
  import pytest
  from mne.datasets import testing
  from mne.datasets.testing import data_path
  from mne.io import BaseRaw, read_raw_fif, read_raw_nirx
  from mne.preprocessing.nirs import beer_lambert_law, optical_density
  from mne.utils import _validate_type
label_desc: Use image node_id 3 for calling a global function with example usage: test_beer_lambert_v_matlab() without return types