def _parse_region(self, rec, line_iter):
had_info = False<EOL>keyvals, section = self._parse_keyvals(line_iter)<EOL>if keyvals:<EOL><INDENT>rec.metadata = keyvals[<NUM_LIT:0>]<EOL><DEDENT>while section and section[<NUM_LIT:0>] != "<STR_LIT>":<EOL><INDENT>had_info = True<EOL>keyvals, next_section = self._parse_keyvals(line_iter)<EOL>attr_name = self._sections[section[<NUM_LIT:0>]]<EOL>if attr_name in self._nolist:<EOL><INDENT>try:<EOL><INDENT>keyvals = keyvals[<NUM_LIT:0>]<EOL><DEDENT>except IndexError:<EOL><INDENT>keyvals = {}<EOL><DEDENT><DEDENT>setattr(rec, attr_name, keyvals)<EOL>section = next_section<EOL><DEDENT>return rec, had_info<EOL>
Parse a section of an ISA-Tab, assigning information to a supplied record.