code: def image2batch(image, image_transform=None):
      if image_transform:
          input_x = image_transform(image)
      else:  # if no transforms supplied then just convert PIL image to tensor
          input_x = transforms.ToTensor()(image)
      input_x = input_x.unsqueeze(0)  # convert to batch of 1
      return input_x
  
file_path: tensorwatch/tensorwatch/pytorch_utils.py
imports: from torchvision import models, transforms
  import torch
  import torch.nn.functional
  from .None import utils, image_utils
  import os
label_desc: Use image node_id 4 for calling a global function with example usage: image2batch(image, image_transform) and returns: input_x