code: def test_lit_deep_vision_model(transform, get_data_path):
      seed = np.random.randint(2147483647)
      random.seed(seed)
      torch.manual_seed(seed)
  
      class ImageDataset(Dataset):
          def __init__(self, root, transform):
              super(ImageDataset, self).__init__()
              self.root = join(root)
              self.transform = transform
              self.images = [
                  f
                  for f in os.listdir(self.root)
                  if f.split(".")[1] == "jpg"
              ]
  
          def __getitem__(self, index):
              image = Image.open(
                  join(self.root, self.images[index])
              ).convert("RGB")
              image = self.transform(image)
              label = (
                  int(self.images[index].split(".")[0].split("_")[1])
                  // 81
              )
              return {"image": image, "label": label}
  
          def __len__(self):
              return len(self.images)
  
      train_folder, test_folder = get_data_path
  
      train_loader = DataLoader(
          ImageDataset(
              train_folder,
              transform,
          ),
          batch_size=16,
          shuffle=True,
          num_workers=0,
          pin_memory=True,
      )
  
      test_loader = DataLoader(
          ImageDataset(
              test_folder,
              transform,
          ),
          batch_size=16,
          shuffle=True,
          num_workers=0,  # make sure this is 0 to avoid 'can't pickle local object Dataset' error
          pin_memory=True,
      )
  
      epochs = 2
      model = LitDeepVisionModel(
          backbone="resnet50",
          additional_layers_to_train=1,
          num_classes=17,
          input_shape=[-1, 3, 224, 224],
          optimizer_name="adam",
          loss_name="cross_entropy",
          label_col="label",
          image_col="image",
      )
  
      callbacks = [MyDummyCallback(epochs)]
      trainer = Trainer(callbacks=callbacks, max_epochs=epochs)
      trainer.fit(model, train_dataloaders=train_loader)
      trainer.test(model, dataloaders=test_loader)
  
file_path: SynapseML/deep-learning/src/test/python/synapsemltest/dl/test_deep_vision_model.py
imports: import os
  import random
  from os.path import join
  import numpy
  import torch
  from PIL import Image
  from pytorch_lightning import Trainer
  from pytorch_lightning.callbacks import Callback
  from torch.utils.data import DataLoader, Dataset
  from synapse.ml.dl import *
label_desc: Use image node_id 1 for calling a global function with example usage: test_lit_deep_vision_model(transform, get_data_path) and returns: dict, len