class_docstr: This class tests all functions of BinarySharedTensor.
class_docstr_tok: ["This","class","tests","all","functions","of","BinarySharedTensor","."]
docstr: Test comparators (>, >=, <, <=, ==, !=)
docstr_tok: ["Test","comparators","(",">",",",">","=",",","<",",","<","=",",","==",",","!","=",")"]
code: def test_comparators(self) -> None:
      """Test comparators (>, >=, <, <=, ==, !=)"""
      for _scale in [False, True]:
          for comp in ["gt", "ge", "lt", "le", "eq", "ne"]:
              for tensor_type in [lambda x: x, BinarySharedTensor]:
                  tensor = get_random_test_tensor(is_float=False)
                  tensor2 = get_random_test_tensor(is_float=False)
  
                  encrypted_tensor = BinarySharedTensor(tensor)
                  encrypted_tensor2 = tensor_type(tensor2)
  
                  reference = getattr(tensor, comp)(tensor2).long()
                  encrypted_out = getattr(encrypted_tensor, comp)(
                      encrypted_tensor2
                  )
  
                  self._check(
                      encrypted_out,
                      reference,
                      "%s comparator failed" % comp,
                  )
  
imports: import itertools
  import logging
  import unittest
  import crypten
  import torch
  from crypten.common.tensor_types import is_int_tensor
  from crypten.mpc.primitives import BinarySharedTensor
  from test.multiprocess_test_case import get_random_test_tensor, MultiProcessTestCase
label_desc: Use image node_id 12 for calling the TestBinary obj's underlying member method code with example usage: obj.test_comparators() without return types