def complete_definition(subj: Identifier,<EOL>source_graph: Graph,<EOL>target_graph: Optional[Graph] = None) -> Graph:
if not target_graph:<EOL><INDENT>target_graph = Graph()<EOL>target_graph.bind("<STR_LIT>", MF)<EOL>target_graph.bind("<STR_LIT>", SHX)<EOL>target_graph.bind("<STR_LIT>", SHT)<EOL><DEDENT>for p, o in source_graph.predicate_objects(subj):<EOL><INDENT>target_graph.add((subj, p, o))<EOL>if isinstance(o, BNode):<EOL><INDENT>complete_definition(o, source_graph, target_graph)<EOL><DEDENT><DEDENT>return target_graph<EOL>
Add a full definition for the supplied subject, following any object bnodes, to target_graph
:param subj: URI or BNode for subject
:param source_graph: Graph containing defininition
:param target_graph: Graph to carry definition
:return: target_graph