def _bind(self, r):
        if isinstance(r, basestring) and not isinstance(r, Identifier) \
              or isinstance(r, Variable):

            if self.bindings[r] == None:
                return None
            else:
                return self.bindings[r]

        elif isinstance(r, (SessionBNode)):
            return r

        elif isinstance(r, (BNode)):
            return self.bindings.get(r)

        else:
            return r
:param r: string
dataset/ETHPy150Open RDFLib/rdfextras/rdfextras/sparql/query.py/_SPARQLNode._bind