code: def getResponseText(endpoint, query, requestedMimeType):
      '''
      endpoint - URL of sparql endpoint
      query    - SPARQL query to be executed
      requestedMimeType  Type of content requested. can be:
                  'text/csv; q=1.0, */*; q=0.1'
                  'application/json'
                  etc.
  
      Returns result + mimetype
      '''
      retFormat = _mimeTypeToSparqlFormat(requestedMimeType)
  
      client = SPARQLWrapper(endpoint)
      client.setQuery(query)
      client.setReturnFormat(retFormat)
      client.setCredentials(static.DEFAULT_ENDPOINT_USER, static.DEFAULT_ENDPOINT_PASSWORD)
      result = client.queryAndConvert()
  
      if retFormat==JSON:
          result = jsonify(result)
  
      return result, MIME_FORMAT[retFormatf getResponseText(endpoint, query, requestedMimeType):
      '''
      endpoint - URL of sparql endpoint
      query    - SPARQL query to be executed
      requestedMimeType  Type of content requested. can be:
                  'text/csv; q=1.0, */*; q=0.1'
                  'application/json'
                  etc.
  
      Returns result + mimetype
      '''
      retFormat = _mimeTypeToSparqlFormat(requestedMimeType)
  
      client = SPARQLWrapper(endpoint)
      client.setQuery(query)
      client.setReturnFormat(retFormat)
      client.setCredentials(static.DEFAULT_ENDPOINT_USER, static.DEFAULT_ENDPOINT_PASSWORD)
      result = client.queryAndConvert()
  
      if retFormat==JSON:
          result = jsonify(result)
  
      return result, MIME_FORMAT[retFormat]
docs: endpoint - URL of sparql endpoint
      query    - SPARQL query to be executed
      requestedMimeType  Type of content requested. can be:
                  'text/csv; q=1.0, */*; q=0.1'
                  'application/json'
                  etc.
  
      Returns result + mimetype