class_docstr: This class tests all functions of the ArithmeticSharedTensor.
docstr: Test the permute operations
docstr_tok: ["Test","the","permute","operations"]
code: def test_permute(self) -> None:
      """Test the permute operations"""
      sizes = [
          (1,),
          (5,),
          (1, 5),
          (1, 5, 7),
          (7, 1, 5),
          (5, 7, 1),
          (1, 3, 5, 7),
          (5, 3, 32, 32),
      ]
      for size in sizes:
          tensor = get_random_test_tensor(size=size, is_float=True)
          encrypted_tensor = ArithmeticSharedTensor(tensor)
  
          # test reversing the dimensions
          dim_arr = [x - 1 for x in range(tensor.dim(), 0, -1)]
          reference = tensor.permute(dim_arr)
          encrypted_out = encrypted_tensor.permute(dim_arr)
          self._check(encrypted_out, reference, "permute failed")
  
          # test one particular non-reversed permutation
          if tensor.dim() == 4:
              dim_arr = [1, 3, 0, 2]
              reference = tensor.permute(dim_arr)
              encrypted_out = encrypted_tensor.permute(dim_arr)
              self._check(encrypted_out, reference, "permute failed")
  
imports: import itertools
  import logging
  import unittest
  import crypten
  import crypten.communicator
  import torch
  import torch.nn.functional
  from crypten.common.rng import generate_random_ring_element
  from crypten.common.tensor_types import is_float_tensor
  from crypten.common.util import count_wraps
  from crypten.mpc.primitives import ArithmeticSharedTensor
  from test.multiprocess_test_case import get_random_test_tensor, MultiProcessTestCase
label_desc: Use image node_id 16 for calling the TestArithmetic obj's underlying member method code with example usage: obj.test_permute() without return types