code: def _exec_cleanup(self, cursor, fd):
          
          LOGGER.debug('Closing cursor and cleaning %s', fd)
          try:
              cursor.close()
          except (psycopg2.Error, psycopg2.Warning) as error:
              LOGGER.debug('Error closing the cursor: %s', error)
  
          self._cleanup_fd(fd)
  
          # If the cleanup callback exists, remove it
          if self._cleanup_callback:
              self._ioloop.remove_timeout(self._cleanup_callback)
  
          # Create a new cleanup callback to clean the pool of idle connections
          self._cleanup_callback = self._ioloop.add_timeout(
              self._ioloop.time() + self._pool_idle_ttl + 1,
              self._pool_manager.clean, self.pid)
docs: Close the cursor, remove any references to the fd in internal state
          and remove the fd from the ioloop.
  
          :param psycopg2.extensions.cursor cursor: The cursor to close
          :param int fd: The connection file descriptor