def create_extracted_license(self, lic):
licenses = list(self.graph.triples((None, self.spdx_namespace.licenseId, lic.identifier)))<EOL>if len(licenses) != <NUM_LIT:0>:<EOL><INDENT>return licenses[<NUM_LIT:0>][<NUM_LIT:0>]  <EOL><DEDENT>else:<EOL><INDENT>license_node = BNode()<EOL>type_triple = (license_node, RDF.type, self.spdx_namespace.ExtractedLicensingInfo)<EOL>self.graph.add(type_triple)<EOL>ident_triple = (license_node, self.spdx_namespace.licenseId, Literal(lic.identifier))<EOL>self.graph.add(ident_triple)<EOL>text_triple = (license_node, self.spdx_namespace.extractedText, Literal(lic.text))<EOL>self.graph.add(text_triple)<EOL>if lic.full_name is not None:<EOL><INDENT>name_triple = (license_node, self.spdx_namespace.licenseName, self.to_special_value(lic.full_name))<EOL>self.graph.add(name_triple)<EOL><DEDENT>for ref in lic.cross_ref:<EOL><INDENT>triple = (license_node, RDFS.seeAlso, URIRef(ref))<EOL>self.graph.add(triple)<EOL><DEDENT>if lic.comment is not None:<EOL><INDENT>comment_triple = (license_node, RDFS.comment, Literal(lic.comment))<EOL>self.graph.add(comment_triple)<EOL><DEDENT>return license_node<EOL><DEDENT>
Handle extracted license.
Return the license node.