''

def add_session_callback(self, callback):

    def cleanup(func):
        if (callback.id in self._removers):
            del self._removers[callback.id]
    if isinstance(callback, PeriodicCallback):
        remover = self._group.add_periodic_callback(callback.callback, callback.period, cleanup)
    elif isinstance(callback, TimeoutCallback):
        remover = self._group.add_timeout_callback(callback.callback, callback.timeout, cleanup)
    elif isinstance(callback, NextTickCallback):
        remover = self._group.add_next_tick_callback(callback.callback, cleanup)
    else:
        raise ValueError(('Expected    callback    of    type    PeriodicCallback,    TimeoutCallback,    NextTickCallback,    got:    %s' % callback.callback))
    self._removers[callback.id] = remover
