code: def image_class2tensor(
      image_path,
      class_index=None,
      image_convert_mode=None,
      image_transform=None,
  ):
      image_pil = image_utils.open_image(
          os.path.abspath(image_path), convert_mode=image_convert_mode
      )
      input_x = image2batch(image_pil, image_transform)
      target_class = (
          int2tensor(class_index) if class_index is not None else None
      )
      return image_pil, input_x, target_class
  
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 5 for calling a global function with example usage: image_class2tensor(image_path, class_index, image_convert_mode, image_transform) and returns: image_pil,  input_x,  target_class