<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __doQuery(self, query, format, convert):
 		""" 		Inner method that does the actual query 		"""

		self.__getFormat(format)
		self.sparql.setQuery(query)
		if convert:
			results = self.sparql.query().convert()
		else:
			results = self.sparql.query()

		return results