code: def test_brainvision_data():
      """Test reading raw Brain Vision files."""
      pytest.raises(OSError, read_raw_brainvision, vmrk_path)
      pytest.raises(
          ValueError,
          read_raw_brainvision,
          vhdr_path,
          preload=True,
          scale="foo",
      )
  
      raw_py = _test_raw_reader(
          read_raw_brainvision,
          vhdr_fname=vhdr_path,
          eog=eog,
          misc="auto",
      )
  
      assert "RawBrainVision" in repr(raw_py)
  
      assert raw_py.info["highpass"] == 0.0
      assert raw_py.info["lowpass"] == 250.0
  
      picks = pick_types(
          raw_py.info, meg=False, eeg=True, exclude="bads"
      )
      data_py, times_py = raw_py[picks]
  
      # compare with a file that was generated using MNE-C
      raw_bin = read_raw_fif(eeg_bin, preload=True)
      picks = pick_types(
          raw_py.info, meg=False, eeg=True, exclude="bads"
      )
      data_bin, times_bin = raw_bin[picks]
  
      assert_allclose(data_py, data_bin)
      assert_allclose(times_py, times_bin)
  
      # Make sure EOG channels are marked correctly
      for ch in raw_py.info["chs"]:
          if ch["ch_name"] in eog:
              assert ch["kind"] == FIFF.FIFFV_EOG_CH
          elif ch["ch_name"] == "STI 014":
              assert ch["kind"] == FIFF.FIFFV_STIM_CH
          elif ch["ch_name"] in ("CP5", "CP6"):
              assert ch["kind"] == FIFF.FIFFV_MISC_CH
              assert ch["unit"] == FIFF.FIFF_UNIT_NONE
          elif ch["ch_name"] == "ReRef":
              assert ch["kind"] == FIFF.FIFFV_MISC_CH
              assert ch["unit"] == FIFF.FIFF_UNIT_CEL
          elif ch["ch_name"] in raw_py.info["ch_names"]:
              assert ch["kind"] == FIFF.FIFFV_EEG_CH
              assert ch["unit"] == FIFF.FIFF_UNIT_V
          else:
              raise RuntimeError("Unknown Channel: %s" % ch["ch_name"])
  
      # test loading v2
      read_raw_brainvision(
          vhdr_v2_path, eog=eog, preload=True, verbose="error"
      )
      # test different units with alternative header file
      raw_units = _test_raw_reader(
          read_raw_brainvision,
          vhdr_fname=vhdr_units_path,
          eog=eog,
          misc="auto",
      )
      assert raw_units.info["chs"][0]["ch_name"] == "FP1"
      assert raw_units.info["chs"][0]["kind"] == FIFF.FIFFV_EEG_CH
      data_units, _ = raw_units[0]
      assert_allclose(data_py[0, :], data_units.squeeze())
  
      assert raw_units.info["chs"][1]["ch_name"] == "FP2"
      assert raw_units.info["chs"][1]["kind"] == FIFF.FIFFV_EEG_CH
      data_units, _ = raw_units[1]
      assert_allclose(data_py[1, :], data_units.squeeze())
  
      assert raw_units.info["chs"][2]["ch_name"] == "F3"
      assert raw_units.info["chs"][2]["kind"] == FIFF.FIFFV_EEG_CH
      data_units, _ = raw_units[2]
      assert_allclose(data_py[2, :], data_units.squeeze())
  
imports: import datetime
  import re
  import shutil
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  from mne import concatenate_raws, pick_types, read_annotations
  from mne._fiff.constants import FIFF
  from mne.annotations import events_from_annotations
  from mne.datasets import testing
  from mne.io import read_raw_brainvision, read_raw_fif
  from mne.io.tests.test_raw import _test_raw_reader
  from mne.utils import _stamp_to_dt, object_diff
label_desc: Use image node_id 13 for calling a global function with example usage: test_brainvision_data() without return types