async def cursor_async(self):
await self.connect_async(loop=self._loop)<EOL>if self.transaction_depth_async() > <NUM_LIT:0>:<EOL><INDENT>conn = self.transaction_conn_async()<EOL><DEDENT>else:<EOL><INDENT>conn = None<EOL><DEDENT>try:<EOL><INDENT>return (await self._async_conn.cursor(conn=conn))<EOL><DEDENT>except:<EOL><INDENT>await self.close_async()<EOL>raise<EOL><DEDENT>
Acquire async cursor.