def handle_pkg_lic(self, p_term, predicate, builder_func):
try:<EOL><INDENT>for _, _, licenses in self.graph.triples((p_term, predicate, None)):<EOL><INDENT>if (licenses, RDF.type, self.spdx_namespace['<STR_LIT>']) in self.graph:<EOL><INDENT>lics = self.handle_conjunctive_list(licenses)<EOL>builder_func(self.doc, lics)<EOL><DEDENT>elif (licenses, RDF.type, self.spdx_namespace['<STR_LIT>']) in self.graph:<EOL><INDENT>lics = self.handle_disjunctive_list(licenses)<EOL>builder_func(self.doc, lics)<EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>lics = self.handle_lics(licenses)<EOL>builder_func(self.doc, lics)<EOL><DEDENT>except SPDXValueError:<EOL><INDENT>self.value_error('<STR_LIT>', licenses)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>except CardinalityError:<EOL><INDENT>self.more_than_one_error('<STR_LIT>'.format(predicate))<EOL><DEDENT>
Handles package lics concluded or declared.