code: def _parse_impedance_ranges(settings):
      """Parse the selected electrode impedance ranges from the header.
  
      Parameters
      ----------
      settings : list
          The header settings lines from the VHDR/AHDR file.
  
      Returns
      -------
      electrode_imp_ranges : dict
          A dictionary of impedance ranges for each type of electrode.
      """
      impedance_ranges = [
          item
          for item in settings
          if "Selected Impedance Measurement Range" in item
      ]
      electrode_imp_ranges = dict()
      if impedance_ranges:
          if len(impedance_ranges) == 1:
              img_range = impedance_ranges[0].split()
              for electrode_type in ["Data", "Reference", "Ground"]:
                  electrode_imp_ranges[electrode_type] = {
                      "imp_lower_bound": float(img_range[-4]),
                      "imp_upper_bound": float(img_range[-2]),
                      "imp_range_unit": img_range[-1],
                  }
          else:
              for electrode_range in impedance_ranges:
                  electrode_range = electrode_range.split()
                  electrode_imp_ranges[electrode_range[0]] = {
                      "imp_lower_bound": float(electrode_range[6]),
                      "imp_upper_bound": float(electrode_range[8]),
                      "imp_range_unit": electrode_range[9],
                  }
      return electrode_imp_ranges
  
imports: import configparser
  import os
  import os.path
  import re
  from datetime import datetime, timezone
  from io import StringIO
  import numpy
  from ..._fiff.constants import FIFF
  from ..._fiff.meas_info import _empty_info
  from ..._fiff.utils import _mult_cal_one, _read_segments_file
  from ...annotations import Annotations, read_annotations
  from ...channels import make_dig_montage
  from ...defaults import HEAD_SIZE_DEFAULT
  from ...transforms import _sph_to_cart
  from ...utils import _DefaultEventParser, fill_doc, logger, verbose, warn
  from ..base import BaseRaw
label_desc: Use image node_id 11 for calling a global function with example usage: _parse_impedance_ranges(settings) and returns: electrode_imp_ranges