code: def add_callbacks(self, callback, errback=None, callback_args=None,
                        callback_kwargs=None, errback_args=None,
                        errback_kwargs=None):
          
          self._callbacks.appendleft((callback, errback, callback_args,
                                 callback_kwargs, errback_args,
                                 errback_kwargs))
  
          if self.called:
              self._do_callbacks()
  
          return self
docs: Add a callback and errback to the callback chain.
  
          If the previous callback succeeds the return value is passed as the
          first argument to the next callback in the chain.
  
          If the previous callback raises an exception the exception is passed as
          the first argument to the next errback in the chain.