docstr: Generate square double of given size
docstr_tok: ["Generate","square","double","of","given","size"]
code: def square(self, ctx, size, device=None):
      """Generate square double of given size"""
      r = generate_random_ring_element(ctx, size, device=device)
      r2 = r.mul(r)
  
      # Stack to vectorize scatter function
      # stacked = torch_stack([r, r2])
      # stacked = ArithmeticSharedTensor(ctx, stacked, precision=0, src=0)
      # return stacked[0], stacked[1]
      # TODO: use stacked tensor to avoid additional communication
      r = ArithmeticSharedTensor(ctx, r, precision=0, src=0)
      r2 = ArithmeticSharedTensor(ctx, r2, precision=0, src=0)
      return r, r2
  
file_path: FATE/python/fate/arch/protocol/mpc/provider/tfp_provider.py
imports: import torch
  import fate.arch.protocol.mpc.communicator
  from fate.arch.protocol.mpc.common.rng import generate_kbit_random_tensor, generate_random_ring_element
  from fate.arch.protocol.mpc.common.util import count_wraps, torch_stack
  from fate.arch.protocol.mpc.primitives import ArithmeticSharedTensor, BinarySharedTensor
  from .provider import TupleProvider
label_desc: Use image node_id 2 for calling the TrustedFirstParty obj's underlying member method code with example usage: obj.square(ctx, size, device) and returns: r,  r2