class_docstr: Encrypted tensor object that uses binary sharing to perform computations.
  
  Binary shares are computed by splitting each value of the input tensor
  into n separate random values that xor together to the input tensor value,
  where n is the number of parties present in the protocol (world_size).
class_docstr_tok: ["Encrypted","tensor","object","that","uses","binary","sharing","to","perform","computations",".","Binary","shares","are","computed","by","splitting","each","value","of","the","input","tensor","into","n","separate","random","values","that","xor","together","to","the","input","tensor","value",",","where","n","is","the","number","of","parties","present","in","the","protocol","(","world_size",")","."]
docstr: Generate a Pseudo-random Sharing of Zero (using arithmetic shares)
  
  This function does so by generating `n` numbers across `n` parties with
  each number being held by exactly 2 parties. Therefore, each party holds
  two numbers. A zero sharing is found by having each party xor their two
  numbers together.
docstr_tok: ["Generate","a","Pseudo-random","Sharing","of","Zero","(","using","arithmetic","shares",")","This","function","does","so","by","generating","`","n","`","numbers","across","`","n","`","parties","with","each","number","being","held","by","exactly","2","parties",".","Therefore",",","each","party","holds","two","numbers",".","A","zero","sharing","is","found","by","having","each","party","xor","their","two","numbers","together","."]
code: def PRZS(*size, device=None):
      """
      Generate a Pseudo-random Sharing of Zero (using arithmetic shares)
  
      This function does so by generating `n` numbers across `n` parties with
      each number being held by exactly 2 parties. Therefore, each party holds
      two numbers. A zero sharing is found by having each party xor their two
      numbers together.
      """
      from crypten import generators
  
      tensor = BinarySharedTensor(src=SENTINEL)
      if device is None:
          device = torch.device("cpu")
      elif isinstance(device, str):
          device = torch.device(device)
      g0 = generators["prev"][device]
      g1 = generators["next"][device]
      current_share = generate_kbit_random_tensor(
          *size, device=device, generator=g0
      )
      next_share = generate_kbit_random_tensor(
          *size, device=device, generator=g1
      )
      tensor.share = current_share ^ next_share
      return tensor
  
imports: import crypten.communicator
  import torch
  from crypten.common.functions import regular
  from crypten.common.rng import generate_kbit_random_tensor
  from crypten.common.tensor_types import is_tensor
  from crypten.common.util import torch_cat, torch_stack
  from crypten.cuda import CUDALongTensor
  from crypten.encoder import FixedPointEncoder
  from .None import beaver, circuit
label_desc: Use image node_id 4 for calling the BinarySharedTensor obj's underlying member method code with example usage: obj.PRZS() and returns: tensor