class_docstr: This class tests all member functions of crypten package
class_docstr_tok: ["This","class","tests","all","member","functions","of","crypten","package"]
docstr: Tests that przs generators are initialized independently
code: def test_przs_generators(self):
      """Tests that przs generators are initialized independently"""
      # Check that each party has two unique generators for next and prev seeds
      for device in crypten.generators["prev"].keys():
          t0 = torch.randint(
              -(2**63),
              2**63 - 1,
              (1,),
              device=device,
              generator=crypten.generators["prev"][device],
          )
          t1 = torch.randint(
              -(2**63),
              2**63 - 1,
              (1,),
              device=device,
              generator=crypten.generators["next"][device],
          )
          self.assertNotEqual(t0.item(), t1.item())
  
          # Check that generators are sync'd as expected
          for rank in range(self.world_size):
              receiver = rank
              sender = (rank + 1) % self.world_size
              if self.rank == receiver:
                  sender_value = comm.get().recv_obj(sender)
                  receiver_value = crypten.generators["next"][
                      device
                  ].initial_seed()
                  self.assertEqual(sender_value, receiver_value)
              elif self.rank == sender:
                  sender_value = crypten.generators["prev"][
                      device
                  ].initial_seed()
                  comm.get().send_obj(sender_value, receiver)
  
imports: import itertools
  import logging
  import math
  import random
  import unittest
  from collections import defaultdict
  import crypten
  import crypten.communicator
  import torch
  import torch.nn.functional
  from crypten.common import serial
  from crypten.common.tensor_types import is_float_tensor
  from crypten.config import cfg
  from test.multiprocess_test_case import get_random_test_tensor, MultiProcessTestCase
  from torch import nn
label_desc: Use image node_id 3 for calling the TestCrypten obj's underlying member method code with example usage: obj.test_przs_generators() without return types