code: def test_bti_ecg_eog_emg(monkeypatch):
      """Test that EOG/ECG/EMG are set properly in BTi."""
      kwargs = dict(rename_channels=False, head_shape_fname=None)
      raw = read_raw_bti(fname_2500, **kwargs)
      ch_types = raw.get_channel_types()
      got = Counter(ch_types)
      # Before improving the triaging in gh-, these values were:
      # want = dict(mag=148, ref_meg=11, ecg=32, stim=2, misc=1)
      want = dict(mag=148, ref_meg=11, ecg=1, stim=2, misc=1, eeg=31)
      assert set(want) == set(got)
      for key in want:
          assert want[key] == got[key], key
  
      # replace channel names with some from HCP (starting from the end)
      # not including UACurrent (misc) or TRIGGER/RESPONSE (stim) b/c they
      # already exist
      got_map = dict(zip(raw.ch_names, ch_types))
      kind_map = dict(
          stim=["TRIGGER", "RESPONSE"],
          misc=["UACurrent"],
      )
      for kind, ch_names in kind_map.items():
          for ch_name in ch_names:
              assert got_map[ch_name] == kind
      kind_map = dict(
          misc=["SA1", "SA2", "SA3"],
          ecg=["ECG+", "ECG-"],
          eog=["VEOG+", "HEOG+", "VEOG-", "HEOG-"],
          emg=["EMG_LF", "EMG_LH", "EMG_RF", "EMG_RH"],
      )
      new_names = sum(kind_map.values(), list())
      assert len(new_names) == 13
      assert set(new_names).intersection(set(raw.ch_names)) == set()
  
      def _read_bti_header_2(*args, **kwargs):
          bti_info = _read_bti_header(*args, **kwargs)
          for ch_name, ch in zip(new_names, bti_info["chs"][::-1]):
              ch["chan_label"] = ch_name
          return bti_info
  
      monkeypatch.setattr(
          mne.io.bti.bti, "_read_bti_header", _read_bti_header_2
      )
      raw = read_raw_bti(fname_2500, **kwargs)
      got_map = dict(zip(raw.ch_names, raw.get_channel_types()))
      got = Counter(got_map.values())
      want = dict(mag=148, ref_meg=11, misc=1, stim=2, eeg=19)
      for kind, ch_names in kind_map.items():
          want[kind] = want.get(kind, 0) + len(ch_names)
      assert set(want) == set(got)
      for key in want:
          assert want[key] == got[key], key
      for kind, ch_names in kind_map.items():
          for ch_name in ch_names:
              assert ch_name in raw.ch_names
              err_msg = f"{ch_name} type {got_map[ch_name]} !+ {kind}"
              assert got_map[ch_name] == kind, err_msg
  
imports: import os
  from collections import Counter
  from functools import partial, reduce
  from io import BytesIO
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_equal
  import mne
  from mne import pick_info, pick_types
  from mne._fiff._digitization import _make_bti_dig_points
  from mne._fiff.constants import FIFF
  from mne.datasets import testing
  from mne.io import read_raw_bti, read_raw_fif
  from mne.io.bti.bti import _check_nan_dev_head_t, _convert_coil_trans, _correct_trans, _get_bti_dev_t, _get_bti_info, _loc_to_coil_trans, _read_bti_header, _read_config, _read_head_shape, _rename_channels
  from mne.io.tests.test_raw import _test_raw_reader
  from mne.transforms import Transform, combine_transforms, invert_transform
  from mne.utils import assert_dig_allclose
label_desc: Use image node_id 14 for calling a global function with example usage: test_bti_ecg_eog_emg(monkeypatch) and returns: bti_info