class_docstr: This class tests all functions of the ArithmeticSharedTensor.
docstr: Test split function of encrypted tensor
docstr_tok: ["Test","split","function","of","encrypted","tensor"]
code: def test_split(self) -> None:
      """Test split function of encrypted tensor"""
      sizes = [(5, 5), (5, 5, 5), (5, 5, 5, 5)]
  
      for size in sizes:
          for dim in range(len(size)):
              tensor = get_random_test_tensor(size=size, is_float=True)
              encrypted = ArithmeticSharedTensor(tensor)
  
              for idx in range(6):
                  split = (idx, 5 - idx)
                  reference0, reference1 = tensor.split(split, dim=dim)
                  encrypted_out0, encrypted_out1 = encrypted.split(
                      split, dim=dim
                  )
  
                  self._check(
                      encrypted_out0,
                      reference0,
                      f"split failed with input {split}",
                  )
                  self._check(
                      encrypted_out1,
                      reference1,
                      f"split failed with input {split}",
                  )
  
              split = (5,)
              (reference,) = tensor.split(split, dim=dim)
              (encrypted_out,) = encrypted.split(split, dim=dim)
              self._check(
                  encrypted_out,
                  reference,
                  f"split failed with input {split}",
              )
  
              with self.assertRaises(RuntimeError):
                  encrypted_out.split((5, 1))
  
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 38 for calling the TestArithmetic obj's underlying member method code with example usage: obj.test_split() without return types