code: def _ReadParserPresetValues(self, preset_definition_values):
      
      if not preset_definition_values:
        raise errors.MalformedPresetError('Missing preset definition values.')
  
      name = preset_definition_values.get('name', None)
      if not name:
        raise errors.MalformedPresetError(
            'Invalid preset definition missing name.')
  
      parsers = preset_definition_values.get('parsers', None)
      if not parsers:
        raise errors.MalformedPresetError(
            'Invalid preset definition missing parsers.')
  
      parser_preset = ParserPreset(name, parsers)
  
      for operating_system_values in preset_definition_values.get(
          'operating_systems', []):
        operating_system = self._ReadOperatingSystemArtifactValues(
            operating_system_values)
        parser_preset.operating_systems.append(operating_system)
  
      return parser_preset
docs: Reads a parser preset from a dictionary.
  
      Args:
        preset_definition_values (dict[str, object]): preset definition values.
  
      Returns:
        ParserPreset: a parser preset.
  
      Raises:
        MalformedPresetError: if the format of the preset definition is not set
            or incorrect, or the preset of a specific operating system has already
            been set.