code: def pil_loader(path):
      # open path as file to avoid ResourceWarning
      # (https://github.com/python-pillow/Pillow/issues/835)
      with open(path, "rb") as f:
          img = Image.open(f)
          return img.convert("RGB")
  
imports: from PIL import Image
label_desc: Use image node_id 1 for calling a global function with example usage: pil_loader(path) and returns: img