code: def _read_21e_file(fname):
      fname = _ensure_path(fname)
      e_fname = fname.with_suffix(".21E")
      _chan_labels = [x for x in _default_chan_labels]
      if e_fname.exists():
          # Read the 21E file and update the labels accordingly.
          logger.info("Found 21E file, reading channel names.")
          for enc in _encodings:
              try:
                  with open(e_fname, encoding=enc) as fid:
                      keep_parsing = False
                      for line in fid:
                          if line.startswith("["):
                              if (
                                  "ELECTRODE" in line
                                  or "REFERENCE" in line
                              ):
                                  keep_parsing = True
                              else:
                                  keep_parsing = False
                          elif keep_parsing is True:
                              idx, name = line.split("=")
                              idx = int(idx)
                              if idx >= len(_chan_labels):
                                  n = idx - len(_chan_labels) + 1
                                  _chan_labels.extend(["UNK"] * n)
                              _chan_labels[idx] = name.strip()
              except UnicodeDecodeError:
                  pass
              else:
                  break
          else:
              warn(
                  f"Could not decode 21E file as one of {_encodings}; "
                  f"Default channel names are chosen."
              )
  
      return _chan_labels
  
imports: from collections import OrderedDict
  from datetime import datetime, timezone
  from pathlib import Path
  import numpy
  from ..._fiff.meas_info import create_info
  from ..._fiff.utils import _mult_cal_one
  from ...annotations import Annotations
  from ...utils import _check_fname, fill_doc, logger, verbose, warn
  from ..base import BaseRaw
label_desc: Use image node_id 4 for calling a global function with example usage: _read_21e_file(fname) and returns: _chan_labels