class_docstr: This class tests all functions of the ArithmeticSharedTensor.
docstr: Tests prod reduction on encrypted tensor.
docstr_tok: ["Tests","prod","reduction","on","encrypted","tensor","."]
code: def test_prod(self) -> None:
      """Tests prod reduction on encrypted tensor."""
      tensor = get_random_test_tensor(
          size=(3, 3), max_value=3, is_float=False
      )
      encrypted = ArithmeticSharedTensor(tensor)
      self._check(
          encrypted.prod(), tensor.prod().float(), "prod failed"
      )
  
      # test with dim argument
      tensor = get_random_test_tensor(
          size=(5, 5, 5), max_value=3, is_float=False
      )
      encrypted = ArithmeticSharedTensor(tensor)
      for dim in [0, 1, 2]:
          reference = tensor.prod(dim).float()
          encrypted_out = encrypted.prod(dim)
          self._check(encrypted_out, reference, "prod 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 7 for calling the TestArithmetic obj's underlying member method code with example usage: obj.test_prod() without return types