code: def ParseRecord(self, parser_mediator, key, structure):
      
      if key != 'line':
        raise errors.ParseError(
            'Unable to parse record, unknown structure: {0:s}'.format(key))
  
      msg_value = structure.get('msg')
      if not msg_value:
        parser_mediator.ProduceExtractionWarning(
            'missing msg value: {0!s}'.format(structure))
        return
  
      try:
        seconds = int(msg_value[0], 10)
      except ValueError:
        parser_mediator.ProduceExtractionWarning(
            'unsupported number of seconds in msg value: {0!s}'.format(
                structure))
        return
  
      try:
        milliseconds = int(msg_value[1], 10)
      except ValueError:
        parser_mediator.ProduceExtractionWarning(
            'unsupported number of milliseconds in msg value: {0!s}'.format(
                structure))
        return
  
      timestamp = ((seconds * 1000) + milliseconds) * 1000
      body_text = structure[2][0]
  
      try:
        # Try to parse the body text as key value pairs. Note that not
        # all log lines will be properly formatted key value pairs.
        key_value_dict = self._SELINUX_KEY_VALUE_DICT.parseString(body_text)
      except pyparsing.ParseException:
        key_value_dict = {}
  
      event_data = SELinuxLogEventData()
      event_data.audit_type = structure.get('type', None)
      event_data.body = body_text
      event_data.pid = key_value_dict.get('pid', None)
      # TODO: pass line number to offset or remove.
      event_data.offset = 0
  
      event = time_events.TimestampEvent(
          timestamp, definitions.TIME_DESCRIPTION_WRITTEN)
      parser_mediator.ProduceEventWithEventData(event, event_data)
docs: Parses a structure of tokens derived from a line of a text file.
  
      Args:
        parser_mediator (ParserMediator): mediates interactions between parsers
            and other components, such as storage and dfvfs.
        key (str): name of the parsed structure.
        structure (pyparsing.ParseResults): structure of tokens derived from
            a line of a text file.
  
      Raises:
        ParseError: when the structure type is unknown.