code: def ParseRecord(self, parser_mediator, key, structure):
      
      if key not in (
          'log_entry', 'log_entry_at_end', 'log_entry_offset',
          'log_entry_offset_at_end'):
        raise errors.ParseError(
            'Unable to parse record, unknown structure: {0:s}'.format(key))
  
      try:
        date_time_string = self._GetISO8601String(structure)
      except ValueError as exception:
        parser_mediator.ProduceExtractionWarning(
            'unable to determine date time string with error: {0!s}'.format(
                exception))
  
      fraction_of_second_length = len(structure.fraction_of_second)
      if fraction_of_second_length == 3:
        date_time = dfdatetime_time_elements.TimeElementsInMilliseconds()
      elif fraction_of_second_length in (6, 7):
        date_time = dfdatetime_time_elements.TimeElementsInMicroseconds()
  
      try:
        date_time.CopyFromStringISO8601(date_time_string)
      except ValueError as exception:
        parser_mediator.ProduceExtractionWarning(
            'unable to parse date time value: {0:s} with error: {1!s}'.format(
                date_time_string, exception))
        return
  
      event_data = SCCMLogEventData()
      event_data.component = structure.component
      # TODO: pass line number to offset or remove.
      event_data.offset = 0
      event_data.text = structure.text
  
      event = time_events.DateTimeValuesEvent(
          date_time, definitions.TIME_DESCRIPTION_WRITTEN)
      parser_mediator.ProduceEventWithEventData(event, event_data)
docs: Parse the record and return an SCCM log event object.
  
      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.