code: def _read_curry_lines(fname, regex_list):
      """Read through the lines of a curry parameter files and save data.
  
      Parameters
      ----------
      fname : path-like
          Path to a curry file.
      regex_list : list of str
          A list of strings or regular expressions to search within the file.
          Each element `regex` in `regex_list` must be formulated so that
          `regex + " START_LIST"` initiates the start and `regex + " END_LIST"`
          initiates the end of the elements that should be saved.
  
      Returns
      -------
      data_dict : dict
          A dictionary containing the extracted data. For each element `regex`
          in `regex_list` a dictionary key `data_dict[regex]` is created, which
          contains a list of the according data.
  
      """
      save_lines = {}
      data_dict = {}
  
      for regex in regex_list:
          save_lines[regex] = False
          data_dict[regex] = []
  
      with open(fname) as fid:
          for line in fid:
              for regex in regex_list:
                  if re.match(regex + " END_LIST", line):
                      save_lines[regex] = False
  
                  if save_lines[regex] and line != "\n":
                      result = line.replace("\n", "")
                      if "\t" in result:
                          result = result.split("\t")
                      data_dict[regex].append(result)
  
                  if re.match(regex + " START_LIST", line):
                      save_lines[regex] = True
  
      return data_dict
  
imports: import os.path
  import re
  from collections import namedtuple
  from datetime import datetime, timezone
  from pathlib import Path
  import numpy
  from ..._fiff._digitization import _make_dig_points
  from ..._fiff.constants import FIFF
  from ..._fiff.meas_info import create_info
  from ..._fiff.tag import _coil_trans_to_loc
  from ..._fiff.utils import _mult_cal_one, _read_segments_file
  from ...annotations import Annotations
  from ...surface import _normal_orth
  from ...transforms import Transform, _angle_between_quats, apply_trans, combine_transforms, get_ras_to_neuromag_trans, invert_transform, rot_to_quat
  from ...utils import _check_fname, check_fname, logger, verbose
  from ..base import BaseRaw
  from ..ctf.trans import _quaternion_align
label_desc: Use image node_id 3 for calling a global function with example usage: _read_curry_lines(fname, regex_list) and returns: data_dict