<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def native(self, writeAccess=False, isolation_level=None):
 """ Opens a new database connection to the database defined by the inputted database. :return <varaint> native connection """

        host = self.database().writeHost() if writeAccess else self.database().host()
        conn = self.open(writeAccess=writeAccess)
        try:
            if isolation_level is not None:
                if conn.isolation_level == isolation_level:
                    isolation_level = None
                else:
                    conn.set_isolation_level(isolation_level)
            yield conn
        except Exception:
            if self._closed(conn):
                conn = None
                self.close()
            else:
                conn = self._rollback(conn)
            raise
        else:
            if not self._closed(conn):
                self._commit(conn)
        finally:
            if conn is not None and not self._closed(conn):
                if isolation_level is not None:
                    conn.set_isolation_level(isolation_level)
                self.__pool[host].put(conn)