code: def test_all_to_all(self):
      rank = self.rank
      world_size = self.world_size
      input_tensor_list = [
          torch.ones(3, 3) * x
          for x in range(rank * world_size, (rank + 1) * world_size)
      ]
      output_tensor_list = [
          torch.empty_like(tensor) for tensor in input_tensor_list
      ]
      dist.all_to_all(output_tensor_list, input_tensor_list)
      expected_tensor_list = [
          torch.ones(3, 3) * x
          for x in range(rank, world_size * world_size, world_size)
      ]
      self.assertEqual(expected_tensor_list, output_tensor_list)
  
imports: import os
  import sys
  import torch
  import torch.distributed
  from torch._C._distributed_c10d import ReduceOp
  from unittest import skip, SkipTest
  import operator
  from functools import reduce
  import threading
  import torch.autograd
  from torch.testing._internal.common_distributed import spawn_threads_and_init_comms, MultiThreadedTestCase, skip_if_lt_x_gpu
  from torch.testing._internal.common_utils import TestCase, run_tests, IS_SANDCASTLE
label_desc: Use image node_id 10 for calling the TestCollectivesWithBaseClass obj's underlying member method code with example usage: obj.test_all_to_all() without return types