code: def _rename_channels(names, ecg_ch="E31", eog_ch=("E63", "E64")):
      """Rename appropriately ordered list of channel names.
  
      Parameters
      ----------
      names : list of str
          Lists of 4-D channel names in ascending order
  
      Returns
      -------
      new : list
          List of names, channel names in Neuromag style
      """
      new = list()
      ref_mag, ref_grad, eog, eeg, ext = (count(1) for _ in range(5))
      for i, name in enumerate(names, 1):
          if name.startswith("A"):
              name = "MEG %3.3d" % i
          elif name == "RESPONSE":
              name = "STI 013"
          elif name == "TRIGGER":
              name = "STI 014"
          elif any(name == k for k in eog_ch):
              name = "EOG %3.3d" % next(eog)
          elif name == ecg_ch:
              name = "ECG 001"
          elif name.startswith("E"):
              name = "EEG %3.3d" % next(eeg)
          elif name == "UACurrent":
              name = "UTL 001"
          elif name.startswith("M"):
              name = "RFM %3.3d" % next(ref_mag)
          elif name.startswith("G"):
              name = "RFG %3.3d" % next(ref_grad)
          elif name.startswith("X"):
              name = "EXT %3.3d" % next(ext)
  
          new += [name]
  
      return new
  
imports: import functools
  import os.path
  from io import BytesIO
  from itertools import count
  import numpy
  from ..._fiff._digitization import _make_bti_dig_points
  from ..._fiff.constants import FIFF
  from ..._fiff.meas_info import _empty_info
  from ..._fiff.tag import _coil_trans_to_loc, _loc_to_coil_trans
  from ..._fiff.utils import _mult_cal_one, read_str
  from ...transforms import Transform, combine_transforms, invert_transform
  from ...utils import _stamp_to_dt, _validate_type, logger, path_like, verbose
  from ..base import BaseRaw
  from .constants import BTI
  from .read import read_char, read_dev_header, read_double, read_double_matrix, read_float, read_float_matrix, read_int16, read_int16_matrix, read_int32, read_int64, read_transform, read_uint16, read_uint32
label_desc: Use image node_id 4 for calling a global function with example usage: _rename_channels(names, ecg_ch, eog_ch) and returns: new