code: def reduce_tensor(tensor, num_gpus):
      rt = tensor.clone()
      dist.all_reduce(rt, op=dist.reduce_op.SUM)
      rt /= num_gpus
      return rt
  
file_path: TTS/TTS/utils/distribute.py
imports: import math
  import torch
  import torch.distributed
  from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors
  from torch.autograd import Variable
  from torch.utils.data.sampler import Sampler
label_desc: Use image node_id 1 for calling a global function with example usage: reduce_tensor(tensor, num_gpus) and returns: rt