def __add__(self, other):
        retval = Graph()
        for (prefix, uri) in set(
                list(self.namespaces()) + list(other.namespaces())):
            retval.bind(prefix, uri)
        for x in self:
            retval.add(x)
        for y in other:
            retval.add(y)
        return retval
Set-theoretic union
dataset/ETHPy150Open RDFLib/rdflib/rdflib/graph.py/Graph.__add__