code: def _expand_qname(self, qname):
          
          if type(qname) is not rt.URIRef:
              raise TypeError("Cannot expand qname of type {}, must be URIRef"
                              .format(type(qname)))
          for ns in self.graph.namespaces():
              if ns[0] == qname.split(':')[0]:
                  return rt.URIRef("%s%s" % (ns[1], qname.split(':')[-1]))
          return qname
docs: expand a qualified name's namespace prefix to include the resolved
          namespace root url