async def cursor(self, conn=None, *args, **kwargs):
in_transaction = conn is not None<EOL>if not conn:<EOL><INDENT>conn = await self.acquire()<EOL><DEDENT>cursor = await conn.cursor(*args, **kwargs)<EOL>cursor.release = functools.partial(<EOL>self.release_cursor, cursor,<EOL>in_transaction=in_transaction)<EOL>return cursor<EOL>
Get a cursor for the specified transaction connection
        or acquire from the pool.