docstr: Gathers a list of tensors in a single party.
docstr_tok: ["Gathers","a","list","of","tensors","in","a","single","party","."]
code: def gather(self, tensor, dst, async_op=False):
      """Gathers a list of tensors in a single party."""
      if async_op:
          raise NotImplementedError()
  
      self.mailbox[dst].put((self.rank, tensor.clone()))
  
      self.barrier.wait()
  
      if self.rank == dst:
          result = [
              self.mailbox[dst].get() for _ in range(self.world_size)
          ]
          return [
              tensor
              for rank, tensor in sorted(result, key=itemgetter(0))
          ]
  
imports: import logging
  import threading
  from operator import itemgetter
  from queue import Queue
  import torch
  from torch.distributed import ReduceOp
  from .communicator import Communicator
label_desc: Use image node_id 14 for calling the InProcessCommunicator obj's underlying member method code with example usage: obj.gather(tensor, dst, async_op) and returns: unknown