code: def test_ascii(tmp_path, data_sep):
      """Test ASCII BV reading."""
      raw = read_raw_brainvision(vhdr_path)
      ascii_vhdr_path = tmp_path / vhdr_path.name
      # copy marker file
      shutil.copy(
          vhdr_path.with_suffix(".vmrk"),
          ascii_vhdr_path.with_suffix(".vmrk"),
      )
      # modify header file
      skipping = False
      with open(ascii_vhdr_path, "wb") as fout:
          with open(vhdr_path, "rb") as fin:
              for line in fin:
                  # Common Infos section
                  if line.startswith(b"DataFormat"):
                      line = b"DataFormat=ASCII\n"
                  elif line.startswith(b"DataFile="):
                      line = b"DataFile=test.dat\n"
                  # Replace the "'Binary Infos'" section
                  elif line.startswith(b"[Binary Infos]"):
                      skipping = True
                      fout.write(
                          b"[ASCII Infos]\nDecimalSymbol=.\nSkipLines=1\n"
                          b"SkipColumns=0\n\n"
                      )
                  elif skipping and line.startswith(b"["):
                      skipping = False
                  if not skipping:
                      fout.write(line)
      # create the .dat file
      data, times = raw[:]
      with open(ascii_vhdr_path.with_suffix(".dat"), "wb") as fid:
          fid.write(
              data_sep.join(
                  ch_name.encode("ASCII") for ch_name in raw.ch_names
              )
              + b"\n"
          )
          fid.write(
              b"\n".join(
                  b" ".join(b"%.3f" % dd for dd in d)
                  for d in data.T / raw._cals
              )
          )
  
      if data_sep == b";":
          with pytest.raises(
              RuntimeError, match="Unknown.*data format"
          ):
              read_raw_brainvision(ascii_vhdr_path)
          return
  
      raw = read_raw_brainvision(ascii_vhdr_path)
      assert isinstance(raw.orig_format, str)
      data_new, times_new = raw[:]
      assert_allclose(data_new, data, atol=1e-15)
      assert_allclose(times_new, times)
  
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 7 for calling a global function with example usage: test_ascii(tmp_path, data_sep) without return types