<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def release_cursor(self, cursor, in_transaction=False):
 """Release cursor coroutine. Unless in transaction, the connection is also released back to the pool. """

        conn = cursor.connection
        await cursor.close()
        if not in_transaction:
            self.release(conn)