def handle_package_has_file_helper(self, pkg_file):
nodes = list(self.graph.triples((None, self.spdx_namespace.fileName, Literal(pkg_file.name))))<EOL>if len(nodes) == <NUM_LIT:1>:<EOL><INDENT>return nodes[<NUM_LIT:0>][<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>raise InvalidDocumentError('<STR_LIT>' +<EOL>'<STR_LIT>'.format(pkg_file.name))<EOL><DEDENT>
Return node representing pkg_file
pkg_file should be instance of spdx.file.