code: def encrypt_data_tensor_with_src(input):
      """Encrypt data tensor for multi-party setting"""
      # get rank of current process
      rank = comm.get().get_rank()
      # get world size
      world_size = comm.get().get_world_size()
  
      if world_size > 1:
          # party 1 gets the actual tensor; remaining parties get dummy tensor
          src_id = 1
      else:
          # party 0 gets the actual tensor since world size is 1
          src_id = 0
  
      if rank == src_id:
          input_upd = input
      else:
          input_upd = torch.empty(input.size())
      private_input = crypten.cryptensor(input_upd, src=src_id)
      return private_input
  
imports: import logging
  import os
  import random
  import shutil
  import tempfile
  import time
  import crypten
  import crypten.communicator
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.optim
  import torch.utils.data
  import torch.utils.data.distributed
  from examples.meters import AverageMeter
  from examples.util import NoopContextManager
  from torchvision import datasets, transforms
label_desc: Use image node_id 6 for calling a global function with example usage: encrypt_data_tensor_with_src(input) and returns: private_input