def test_compute_qname(self):
        g = Graph()
        self.assertEqual(g.compute_qname(URIRef("http://foo/bar/baz")),
            ("ns1", URIRef("http://foo/bar/"), "baz"))

        self.assertEqual(g.compute_qname(URIRef("http://foo/bar#baz")),
            ("ns2", URIRef("http://foo/bar#"), "baz"))
        
        # should skip to ns4 when ns3 is already assigned
        g.bind("ns3", URIRef("http://example.org/"))
        self.assertEqual(g.compute_qname(URIRef("http://blip/blop")),
            ("ns4", URIRef("http://blip/"), "blop"))
Add GWT-specific annotations and naming schemes.
dataset/ETHPy150Open RDFLib/rdflib/test/test_namespace.py/NamespacePrefixTest.test_compute_qname--crossover with--dataset/ETHPy150Open google/apis-client-generator/src/googleapis/codegen/gwt_generator.py/GwtGenerator.AnnotateMethod