


# the callback is installed through the `then(cb)` API. In the
  >>>     # mean time, the `rpc_async` to "worker2" can run concurrently.
  >>>     # When the return value of that `rpc_async` arrives at
  >>>     # "worker1", "worker1" will run the lambda function accordingly
  >>>     # and set the value for the previously returned `Future`, which
  >>>     # will then trigger RPC to send the result back to "worker0".
  >>>     return rpc.rpc_async(to, torch.add, args=(x, y)).then(
  >>>         lambda fut: fut.wait() + z
  >>>     )
  >>>
  >>> # On worker0
  >>> ret = rpc.rpc_sync(
  >>>     "worker1",
  >>>     async_add_chained,
  >>>     args=("worker2", torch.ones(2), 1, 1)
  >>> )
  >>> print(ret)  # prints tensor([3., 3.])




  When combined with TorchScript decorators, this decorator must
  be the outmost one.

  >>> from torch import Tensor
  >>> from torch.futures import Future
