def poll_invalidations(conn, cursor, prev_polled_tid):
    """
        Polls for new transactions.

        *conn* and *cursor* must have been created previously by
        ``open_for_load()`` (a snapshot connection). *prev_polled_tid*
        is the tid returned at the last poll, or None if this is the
        first poll.

        If the database has disconnected, this method should raise one
        of the exceptions listed in the disconnected_exceptions
        attribute of the associated IConnectionManager.

        Returns ``(changes, new_polled_tid)``, where changes is either
        an iterable of (oid, tid) that have changed, or None to
        indicate that the changes are too complex to list; this must
        cause local storage caches to be invalidated.
        ``new_polled_tid`` is never None.

        Important: You must consume the changes iterable, and you must
        not make any other queries until you do.

        This method may raise :class:`StaleConnectionError` (a
        ``ReadConflictError``) if the database has reverted to an
        earlier transaction, which can happen in an asynchronously
        replicated database. This exception is one that is transient
        and most transaction middleware will catch it and retry the
        transaction.
        """
