code: def _read_segment_lines(segment_lines):
      
      # Dictionary for segment fields
      segment_fields = {}
  
      # Each dictionary field is a list
      for field in SEGMENT_SPECS.index:
          segment_fields[field] = [None] * len(segment_lines)
  
      # Read string fields from signal line
      for i in range(len(segment_lines)):
          (segment_fields['seg_name'][i], segment_fields['seg_len'][i]) = _rx_segment.findall(segment_lines[i])[0]
  
          # Typecast strings for numerical field
          if field == 'seg_len':
              segment_fields['seg_len'][i] = int(segment_fields['seg_len'][i])
  
      return segment_fields
docs: Extract fields from segment line strings into a dictionary