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).
docstr: Generate a uniform random samples with a given size.
docstr_tok: ["Generate","a","uniform","random","samples","with","a","given","size","."]
code: def rand(*size, bits=64, device=None):
      """
      Generate a uniform random samples with a given size.
      """
      tensor = BinarySharedTensor(src=SENTINEL)
      if isinstance(size[0], (torch.Size, tuple)):
          size = size[0]
      tensor.share = generate_kbit_random_tensor(
          size, bitlength=bits, device=device
      )
      return tensor
  
imports: import torch
  import fate.arch.protocol.mpc.communicator
  from fate.arch.protocol.mpc.common.rng import generate_kbit_random_tensor
  from fate.arch.protocol.mpc.common.tensor_types import is_tensor
  from fate.arch.protocol.mpc.common.util import torch_cat, torch_stack
  from fate.arch.protocol.mpc.cuda import CUDALongTensor
  from fate.arch.protocol.mpc.encoder import FixedPointEncoder
  from fate.arch.protocol.mpc.functions import regular
  from .None import beaver, circuit
label_desc: Use image node_id 5 for calling the BinarySharedTensor obj's underlying member method code with example usage: obj.rand() and returns: tensor