code: def _parse_calibration(
      lines,
      screen_size=None,
      screen_distance=None,
      screen_resolution=None,
  ):
      """Parse the lines in the given list and returns a list of Calibration instances.
  
      Parameters
      ----------
          lines: A list of strings, which are The lines in an eyelink ASCII file.
  
      Returns
      -------
          A list containing one or more Calibration instances,
          one for each calibration that was recorded in the eyelink ASCII file
          data.
      """
      from ...preprocessing.eyetracking.calibration import Calibration
  
      regex = re.compile(r"\d+")  # for finding numeric characters
      calibrations = list()
      rec_start = float(_find_recording_start(lines).split()[1])
  
      for line_number, line in enumerate(lines):
          if (
              "!CAL VALIDATION " in line and "ABORTED" not in line
          ):  # Start of a calibration
              tokens = line.split()
              model = tokens[4]  # e.g. 'HV13'
              this_eye = tokens[6].lower()  # e.g. 'left'
              timestamp = float(tokens[1])
              onset = (timestamp - rec_start) / 1000.0  # in seconds
              avg_error = float(
                  line.split("avg.")[0].split()[-1]
              )  # e.g. 0.3
              max_error = float(
                  line.split("max")[0].split()[-1]
              )  # e.g. 0.9
  
              n_points = int(regex.search(model).group())  # e.g. 13
              n_points *= (
                  2 if "LR" in line else 1
              )  # one point per eye if "LR"
              # The next n_point lines contain the validation data
              points = []
              for validation_index in range(n_points):
                  subline = lines[line_number + validation_index + 1]
                  if "!CAL VALIDATION" in subline:
                      continue  # for bino mode, skip the second eye's validation summary
                  subline_eye = (
                      subline.split("at")[0].split()[-1].lower()
                  )  # e.g. 'left'
                  if subline_eye != this_eye:
                      continue  # skip the validation lines for the other eye
                  point_info = _parse_validation_line(subline)
                  points.append(point_info)
              # Convert the list of validation data into a numpy array
              positions = np.array([point[:2] for point in points])
              offsets = np.array([point[2] for point in points])
              gaze = np.array([point[3:] for point in points])
              # create the Calibration instance
              calibration = Calibration(
                  onset=onset,
                  model=model,
                  eye=this_eye,
                  avg_error=avg_error,
                  max_error=max_error,
                  positions=positions,
                  offsets=offsets,
                  gaze=gaze,
                  screen_size=screen_size,
                  screen_distance=screen_distance,
                  screen_resolution=screen_resolution,
              )
              calibrations.append(calibration)
      return calibrations
  
imports: import re
  from datetime import datetime, timedelta, timezone
  import numpy
  from ..._fiff.constants import FIFF
  from ..._fiff.meas_info import create_info
  from ...annotations import Annotations
  from ...utils import _check_pandas_installed, logger, warn
label_desc: Use image node_id 25 for calling a global function with example usage: _parse_calibration(lines, screen_size, screen_distance, screen_resolution) and returns: calibrations