code: def load_jpeg_from_file(path, image_size, cuda=True):
      img_transforms = transforms.Compose(
          [
              transforms.Resize(image_size + 32),
              transforms.CenterCrop(image_size),
              transforms.ToTensor(),
          ]
      )
  
      img = img_transforms(Image.open(path))
      with torch.no_grad():
          # mean and std are not multiplied by 255 as they are in training script
          # torch dataloader reads data into bytes whereas loading directly
          # through PIL creates a tensor with floats in [0,1] range
          mean = torch.tensor([0.485, 0.456, 0.406]).view(1, 3, 1, 1)
          std = torch.tensor([0.229, 0.224, 0.225]).view(1, 3, 1, 1)
  
          if cuda:
              mean = mean.cuda()
              std = std.cuda()
              img = img.cuda()
          img = img.float()
  
          input = img.unsqueeze(0).sub_(mean).div_(std)
  
      return input
  
file_path: DALI/docs/examples/use_cases/pytorch/efficientnet/classify.py
imports: from PIL import Image
  import argparse
  import numpy
  import json
  import torch
  from torch.cuda.amp import autocast
  import torch.backends.cudnn
  from image_classification import models
  import torchvision.transforms
  from image_classification.models import efficientnet_b0
label_desc: Use image node_id 3 for calling a global function with example usage: load_jpeg_from_file(path, image_size, cuda) and returns: input