code: def pre_processing(data, context):
      if data:
          images = []
  
          for row in data:
              image = row.get("data") or row.get("body")
              image = Image.open(io.BytesIO(image))
              image = image_processing(image)
              images.append(image)
  
          return images
  
file_path: serve/frontend/server/src/test/resources/densenet_workflow_handler.py
imports: import io
  import logging
  import os
  from PIL import Image
  import torch.nn.functional
  import torch
  import itertools
  import json
  from torchvision import transforms
label_desc: Use image node_id 1 for calling a global function with example usage: pre_processing(data, context) and returns: images