=========================
Putting it all together, the following is a simple end to end example
using distributed autograd and the distributed optimizer. If the code
is placed into a file called "dist_autograd_simple.py", it can be run
with the command "MASTER_ADDR="localhost" MASTER_PORT=29500 python
dist_autograd_simple.py":
import torch
   import torch.multiprocessing as mp
   import torch.distributed.autograd as dist_autograd
   from torch.distributed import rpc
   from torch import optim
   from torch.distributed.optim import DistributedOptimizer
def random_tensor():
       return torch.rand((3, 3), requires_grad=True)
def _run_process(rank, dst_rank, world_size):
       name = "worker{}".format(rank)
       dst_name = "worker{}".format(dst_rank)
   # Initialize RPC.
   rpc.init_rpc(
       name=name,
       rank=rank,
       world_size=world_size
   )

   # Use a distributed autograd context.
   with dist_autograd.context() as context_id:
