code: def test_vhdr_versions(tmp_path, header):
      """Test BV reading with different header variants."""
      raw_init = read_raw_brainvision(vhdr_path)
      data_expected, times_expected = raw_init[:]
      use_vhdr_path = tmp_path / vhdr_path.name
      use_vmrk_path = tmp_path / vmrk_path.name
      use_eeg_path = tmp_path / eeg_path.name
      shutil.copy(eeg_path, use_eeg_path)
      with open(use_vhdr_path, "wb") as fout:
          with open(vhdr_path, "rb") as fin:
              for line in fin:
                  # Common Infos section
                  if line.startswith(b"Brain"):
                      if header != b"\n":
                          line = header % b"Header"
                      else:
                          line = header
                  fout.write(line)
      with open(use_vmrk_path, "wb") as fout:
          with open(vmrk_path, "rb") as fin:
              for line in fin:
                  # Common Infos section
                  if line.startswith(b"Brain"):
                      if header != b"\n":
                          line = header % b"Marker"
                      else:
                          line = header
                  fout.write(line)
  
      if b"3.0" in header:  # unsupported version
          with pytest.warns(
              RuntimeWarning, match=r"3\.0.*Contact MNE-Python"
          ):
              read_raw_brainvision(use_vhdr_path)
          return
      elif header == b"\n":  # no version header
          with pytest.warns(RuntimeWarning, match="Missing header"):
              read_raw_brainvision(use_vhdr_path)
          return
      else:
          raw = read_raw_brainvision(use_vhdr_path)
          data_new, _ = raw[:]
          assert_allclose(data_new, data_expected, atol=1e-15)
  
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 6 for calling a global function with example usage: test_vhdr_versions(tmp_path, header) without return types