def find_prop_overlap(rdf, prop1, prop2):
for s, o in sorted(rdf.subject_objects(prop1)):<EOL><INDENT>if (s, prop2, o) in rdf:<EOL><INDENT>yield (s, o)<EOL><DEDENT><DEDENT>
Generate (subject,object) pairs connected by two properties.