code: def test_beer_lambert(fname, fmt, tmp_path):
      """Test converting NIRX files."""
      assert fmt in ("nirx", "fif")
      raw = read_raw_nirx(fname)
      if fmt == "fif":
          raw.save(tmp_path / "test_raw.fif")
          raw = read_raw_fif(tmp_path / "test_raw.fif")
      assert "fnirs_cw_amplitude" in raw
      assert "fnirs_od" not in raw
      raw = optical_density(raw)
      _validate_type(raw, BaseRaw, "raw")
      assert "fnirs_cw_amplitude" not in raw
      assert "fnirs_od" in raw
      assert "hbo" not in raw
      raw = beer_lambert_law(raw)
      _validate_type(raw, BaseRaw, "raw")
      assert "fnirs_cw_amplitude" not in raw
      assert "fnirs_od" not in raw
      assert "hbo" in raw
      assert "hbr" in raw
  
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 1 for calling a global function with example usage: test_beer_lambert(fname, fmt, tmp_path) without return types