def get(self, namespace, ident):
        """Retrieve relations for an element.

        The element can be a 'node' or 'way'.
        """

        if namespace not in [C.NODE, C.WAY, C.RELATION]:
            raise tornado.web.HTTPError(500)

        elem = self.datastore.fetch(namespace, ident)

        osm = new_osm_response()

        if elem:
            relset = filter_references(C.RELATION, [elem])
            if len(relset) > 0:
                relations = self.datastore.fetch_keys(C.RELATION,
                                                      [r for r in relset])
                for (st,r) in relations:
                    if st:
                        r.build_response(osm)

        self.set_header(C.CONTENT_TYPE, C.TEXT_XML)
        self.write(response_to_xml(osm))
dataset/ETHPy150Open MapQuest/mapquest-osm-server/src/python/frontend/osmelement.py/OsmElementRelationsHandler.get/original