<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def query_fetch_one(self, query, values):
 """ Executes a db query, gets the first value, and closes the connection. """

        self.cursor.execute(query, values)
        retval = self.cursor.fetchone()
        self.__close_db()
        return retval