def predicates(self, subject=None, object=None):
        for s, p, o in self.triples((subject, None, object)):
            yield p
A generator of predicates with the given subject and object
dataset/ETHPy150Open RDFLib/rdflib/rdflib/graph.py/Graph.predicates