code: def _reduce(input_, process_group):
      # skip if only one rank involved
      if dist.get_world_size(process_group) == 1:
          return input_
      else:
          dist.all_reduce(input_, group=process_group)
          return input_
  
imports: import torch
  import torch.distributed
  import torch.nn.functional
label_desc: Use image node_id 2 for calling a global function with example usage: _reduce(input_, process_group) and returns: input_, input_