'Adds a callback to be run on the next tick.
Returns a callable that removes the callback if called.'

def add_next_tick_callback(self, callback, cleanup=None):

    if (callback in self._next_tick_callbacks):
        raise ValueError('Next-tick    callback    added    twice')
    wrapper = self._wrap_next_tick(callback, cleanup)
    self._loop.add_callback(wrapper)
    def remover():
        wrapper.handle['removed'] = True
        self._remover(callback, self._next_tick_callbacks, cleanup)
    self._next_tick_callbacks[callback] = remover
    return remover
