code: def get_random_test_tensor(
      max_value=6,
      min_value=None,
      size=(1, 5),
      is_float=False,
      ex_zero=False,
      device=None,
  ):
      """Generates random tensor for testing
  
      Args:
          max_value (int): defines maximum value for int tensor
          min_value (int): defines minimum value for int tensor
          size (tuple): size of tensor
          is_float (bool): determines float or int tensor
          ex_zero (bool): excludes zero tensor
  
      Returns: torch.tensor
      """
      if min_value is None:
          min_value = -max_value
      if is_float:
          tensor = (
              torch.rand(torch.Size(size), device=device)
              * (max_value - min_value)
              + min_value
          )
      else:
          tensor = torch.randint(
              min_value,
              max_value,
              torch.Size(size),
              dtype=torch.int64,
              device=device,
          )
      if ex_zero:
          # replace 0 with 1
          tensor[tensor == 0] = 1
  
      # Broadcast this tensor to the world so that the generated random tensor
      # is in sync in all distributed processes. See T45688819 for more
      # information.
      tensor = comm.get().broadcast(tensor, 0)
  
      return tensor
  
imports: import multiprocessing
  import os
  import sys
  import tempfile
  import traceback
  import unittest
  import warnings
  from functools import wraps
  import crypten.communicator
  import crypten.debug
  import torch
  import torch.distributed
  from crypten.config import cfg
label_desc: Use image node_id 1 for calling a global function with example usage: get_random_test_tensor(max_value, min_value, size, is_float, ex_zero, device) and returns: tensor