class_docstr: This class tests all member functions of crypten package
code: def test_gather_random(self) -> None:
      sizes = [(), (1,), (5,), (5, 5), (5, 5, 5), (1000,)]
      for rank in range(self.world_size):
          for size in sizes:
              tensor = get_random_test_tensor(size=size)
              result = comm.get().gather(tensor, rank)
              if rank == self.rank:
                  self.assertTrue(isinstance(result, list))
                  for res in result:
                      self.assertTrue((res == tensor).all())
              else:
                  self.assertIsNone(result[0])
  
imports: import unittest
  import crypten
  import crypten.communicator
  import numpy
  import torch
  import torch.distributed
  import torch.nn
  import torch.nn.functional
  from crypten.common import serial
  from crypten.config import cfg
  from test.multiprocess_test_case import get_random_test_tensor, MultiProcessTestCase
label_desc: Use image node_id 6 for calling the TestCommunicator obj's underlying member method code with example usage: obj.test_gather_random() without return types