Submit a sparql query to the server to search metadata
        and annotations.

        :type collection_name: String
        :param collection_name: the name of the collection to search
        :type query: String
        :param query: the sparql query

        :rtype: Dict
        :returns: the query result from the server as a Python dictionary
            following the format of the SPARQL JSON result format documented
            at http://www.w3.org/TR/rdf-sparql-json-res/

        :raises: APIError if the request was not successful

def sparql_query(self, collection_name, query):
        """ Submit a sparql query to the server to search metadata
        and annotations.

        :type collection_name: String
        :param collection_name: the name of the collection to search
        :type query: String
        :param query: the sparql query

        :rtype: Dict
        :returns: the query result from the server as a Python dictionary
            following the format of the SPARQL JSON result format documented
            at http://www.w3.org/TR/rdf-sparql-json-res/

        :raises: APIError if the request was not successful


        """
        request_url = '/sparql/' + collection_name + '?'
        request_url += urlencode((('query', query),))

        return self.api_request(request_url)