code: def validate_side_by_side(val_loader, plaintext_model, private_model):
      """Validate the plaintext and private models side-by-side on each example"""
      # switch to evaluate mode
      plaintext_model.eval()
      private_model.eval()
  
      with torch.no_grad():
          for i, (input, target) in enumerate(val_loader):
              # compute output for plaintext
              output_plaintext = plaintext_model(input)
              # encrypt input and compute output for private
              # assumes that private model is encrypted with src=0
              input_encr = encrypt_data_tensor_with_src(input)
              output_encr = private_model(input_encr)
              # log all info
              logging.info("==============================")
              logging.info("Example %d\t target = %d" % (i, target))
              logging.info("Plaintext:\n%s" % output_plaintext)
              logging.info(
                  "Encrypted:\n%s\n" % output_encr.get_plain_text()
              )
              # only use the first 1000 examples
              if i > 1000:
                  break
  
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 3 for calling a global function with example usage: validate_side_by_side(val_loader, plaintext_model, private_model) without return types