docs: def add_done_callback(self, function, **kwargs):
          """Add a done callback to be invoked when transfer is complete """
          with self._callbacks_lock:
              _function = functools.partial(function, **kwargs)
              self._done_callbacks.append(_function)