code: def reduce(tensor, dst, op=ReduceOp.SUM, group=group.WORLD):
      """
      Reduces the tensor data across all machines.
  
      Only the process with rank ``dst`` is going to receive the final result.
  
      Arguments:
          tensor (Tensor): Input of the collective.
          dst (int): Destination rank.
          op (optional): One of the values from
              ``torch.distributed.ReduceOp``
              enum.  Specifies an operation used for element-wise reductions.
          group (ProcessGroup, optional): The process group to work on.
  
      Returns:
          Tensor: Output of the collective.
  
      """
      return _Reduce.apply(dst, op, group, tensor)
  
imports: import torch
  import torch.distributed
  from torch.autograd import Function
  from torch.distributed import group, ReduceOp
label_desc: Use image node_id 4 for calling a global function with example usage: reduce(tensor, dst, op, group) and returns: _Reduce