'Parses a series of \'keyword => (value, pgp block)\' mappings and applies
them as attributes.
:param dict entries: descriptor contents to be applied
:param bool validate: checks the validity of descriptor content if True
:param dict parsers: mapping of lines to the function for parsing it
:raises: **ValueError** if an error occurs in validation'

def _parse(self, entries, validate, parser_for_line=None):

    if (parser_for_line is None):
        parser_for_line = self.PARSER_FOR_LINE
    for attr in self.ATTRIBUTES:
        if (not hasattr(self, attr)):
            setattr(self, attr, copy.copy(self.ATTRIBUTES[attr][0]))
    for (keyword, values) in list(entries.items()):
        try:
            if (keyword in parser_for_line):
                parser_for_line[keyword](self, entries)
            else:
                for (value, block_type, block_contents) in values:
                    line = ('%s    %s' % (keyword, value))
                    if block_contents:
                        line += ('\n%s' % block_contents)
                    self._unrecognized_lines.append(line)
        except ValueError as exc:
            if validate:
                raise exc
