'Add an observer function function to the Session. The observer
function will be called when one of the specified events (changeTypes)
occurs on the specified subject.
The function will be called by a popup thread which can be used indefinitely (within reason)
by the higher level code. Note that this function is called by any thread and is thread safe.
:param observer_function: should accept as its first argument
the subject, as second argument the changeType, as third argument an
object_id (e.g. the primary key in the observed database) and an
optional list of arguments.
:param subject: the subject to observe, one of NTFY_* subjects (see simpledefs).
:param change_types: the list of events to be notified of one of NTFY_* events.
:param object_id: The specific object in the subject to monitor (e.g. a
specific primary key in a database to monitor for updates.)
:param cache: the time to bundle/cache events matching this function'

def add_observer(self, observer_function, subject, change_types=None, object_id=None, cache=0):

    change_types = (change_types or [NTFY_UPDATE, NTFY_INSERT, NTFY_DELETE])
    self.notifier.add_observer(observer_function, subject, change_types, object_id, cache=cache)
