def METHOD_NAME(endpoint):
    """
        Retrieve UPRNs as instantiated using UPRN agent
        Returns dict of {'bldgIRI': set of UPRNs}
    """
    sparql = SPARQLWrapper(endpoint)
    sparql.setReturnFormat(JSON)
    query_string = f"""
    PREFIX ocgml: <http://www.theworldavatar.com/ontology/ontocitygml/citieskg/OntoCityGML.owl#>
    PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 
    PREFIX osid: <http://www.theworldavatar.com/ontology/ontocitygml/citieskg/OntoOSID.owl#>
    SELECT DISTINCT ?bldg ?cityobj ?uprns
    WHERE {{ 
    GRAPH <{namespace}building/>                             
            {{ ?bldg ocgml:objectClassId 26 .
            BIND(IRI(REPLACE(str(?bldg), "building", "cityobject")) AS ?cityobj) 
            }}
            {{ # UPRNs from UPRN Agent
            SELECT DISTINCT ?cityobj ?uprns
            WHERE {{
                GRAPH <{namespace}identifiers>
                    {{ OPTIONAL {{
                        ?cityobj ^osid:intersectsFeature/osid:hasValue ?uprns
                        }}
                    }}
                }}
            }}
    }}
    """
    sparql.setQuery(query_string)
    results = sparql.query().convert()
    # Create dict of building IRIs and set of UPRNs
    bldgs = [r['bldg']['value'] for r in results['results']['bindings']]
    bldgs = set(bldgs)
    res = {b: set() for b in bldgs}
    for r in results['results']['bindings']:
        if r.get('uprns'):
            res[r['bldg']['value']].add(r['uprns']['value'])
    return res