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