class_docstr: Gather tensors from all workers with support for backward propagation:
  This implementation does not cut the gradients as torch.distributed.all_gather does.
code: def backward(ctx, *grads):
      all_gradients = torch.stack(grads)
      dist.all_reduce(all_gradients)
      return all_gradients[dist.get_rank()]
  
imports: import contextlib
  import logging
  import os
  import pickle
  import socket
  import subprocess
  import warnings
  from itertools import chain
  import torch
  from mmf.common.registry import registry
  from torch import distributed
label_desc: Use image node_id 2 for calling the GatherLayer obj's underlying member method code with example usage: obj.backward(ctx) and returns: all_gradients