code: def add_done_callback(self, future, callback):
          
          if future is None:
              raise bridge.BridgeReferenceError(
                  "Tried to add a callback to a nonexistent Future. "
                  "Make sure you pass the `returns` argument to your JavaMethod")
          return self.loop.add_done_callback(future, callback)
docs: Add a callback on a future object put here so it can be
          implemented with different event loops.
  
          Parameters
          -----------
              future: Future or Deferred
                  Future implementation for the current EventLoop
                  
              callback: callable
                  Callback to invoke when the future is done