code: def parse_metrics_line(line_number: int, line: str) -> Dict[str, Any]:
      
      fields = line.split('\t')
      checkpoint = int(fields[0])
      check_condition(line_number == checkpoint,
                      "Line (%d) and loaded checkpoint (%d) do not align." % (line_number, checkpoint))
      metric = dict()  # type: Dict[str, Any]
      for field in fields[1:]:
          key, value = field.split("=", 1)
          if value == 'True' or value == 'False':
              metric[key] = (value == 'True')
          else:
              metric[key] = float(value)
      return metric
docs: Parse a line of metrics into a mappings of key and values.
  
      :param line_number: Line's number for checking if checkpoints are aligned to it.
      :param line: A line from the Sockeye metrics file.
      :return: Dictionary of metric names (e.g. perplexity-train) mapping to a list of values.