code: def test_ch_names_comma(tmp_path):
      """Test that channel names containing commas are properly read."""
      # commas in BV are encoded as \1
      replace_dict = {
          r"^Ch4=F4,": r"Ch4=F4\\1foo,",
          r"^4\s\s\s\s\sF4": "4     F4,foo ",
      }
  
      # Copy existing vhdr file to tmp_path and manipulate to contain
      # a channel with comma
      for src, dest in zip(
          (vhdr_path, vmrk_path, eeg_path),
          ("test.vhdr", "test.vmrk", "test.eeg"),
      ):
          shutil.copyfile(src, tmp_path / dest)
  
      comma_vhdr = tmp_path / "test.vhdr"
      with open(comma_vhdr) as fin:
          lines = fin.readlines()
  
      new_lines = []
      nperformed_replacements = 0
      for line in lines:
          for to_replace, replacement in replace_dict.items():
              match = re.search(to_replace, line)
              if match is not None:
                  new = re.sub(to_replace, replacement, line)
                  new_lines.append(new)
                  nperformed_replacements += 1
                  break
          else:
              new_lines.append(line)
      assert nperformed_replacements == len(replace_dict)
  
      with open(comma_vhdr, "w") as fout:
          fout.writelines(new_lines)
  
      # Read the line containing a "comma channel name"
      raw = read_raw_brainvision(comma_vhdr)
      assert "F4,foo" in raw.ch_names
  
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 8 for calling a global function with example usage: test_ch_names_comma(tmp_path) without return types