def _line_by_type(self, line, header, hgroups, htypes, out, want_type,<EOL>collapse_quals_fn = None):
for index, htype in ((i, t) for i, t in enumerate(htypes) if t == want_type):<EOL><INDENT>col = hgroups[index][<NUM_LIT:0>]<EOL>key = header[col]<EOL>if collapse_quals_fn:<EOL><INDENT>val = collapse_quals_fn(line, header, hgroups[index])<EOL><DEDENT>else:<EOL><INDENT>val = line[col]<EOL><DEDENT>out[key].add(val)<EOL><DEDENT>return out<EOL>
Parse out key value pairs for line information based on a group of values.