<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_callback(self, fn, *args, **kwargs):
 """ Attaches a callback function to be called when the final results arrive. By default, `fn` will be called with the results as the first and only argument. If `*args` or `**kwargs` are supplied, they will be passed through as additional positional or keyword arguments to `fn`. If an error is hit while executing the operation, a callback attached here will not be called. Use :meth:`.add_errback()` or :meth:`add_callbacks()` if you wish to handle that case. If the final result has already been seen when this method is called, the callback will be called immediately (before this method returns). Note: in the case that the result is not available when the callback is added, the callback is executed by IO event thread. This means that the callback should not block or attempt further synchronous requests, because no further IO will be processed until the callback returns. **Important**: if the callback you attach results in an exception being raised, **the exception will be ignored**, so please ensure your callback handles all error cases that you care about. Usage example:: """

        run_now = False
        with self._callback_lock:
            # Always add fn to self._callbacks, even when we're about to
            # execute it, to prevent races with functions like
            # start_fetching_next_page that reset _final_result
            self._callbacks.append((fn, args, kwargs))
            if self._final_result is not _NOT_SET:
                run_now = True
        if run_now:
            fn(self._final_result, *args, **kwargs)
        return self