code: def reduce_tensor(tensor, n):
      rt = tensor.clone()
      dist.all_reduce(rt, op=dist.ReduceOp.SUM)
      rt /= n
      return rt
  
file_path: pytorch-image-models/timm/utils/distributed.py
imports: import os
  import torch
  from torch import distributed
  from .model import unwrap_model
label_desc: Use image node_id 1 for calling a global function with example usage: reduce_tensor(tensor, n) and returns: rt