parameters: (self, function, *args, **kwargs)
docstring: Add a done callback to be invoked when transfer is done
docstring_summary: Add a done callback to be invoked when transfer is done
docstring_tokens: Add a done callback to be invoked when transfer is done
function: def add_done_callback(self, function, *args, **kwargs):
          """Add a done callback to be invoked when transfer is done"""
          with self._done_callbacks_lock:
              self._done_callbacks.append(
                  FunctionContainer(function, *args, **kwargs)
              )
function_tokens: def add_done_callback ( self , function , * args , * * kwargs ) : with self . _done_callbacks_lock : self . _done_callbacks . append ( FunctionContainer ( function , * args , * * kwargs ) )