code: def load_img(path, grayscale=False):
      """Read the image from a give path"""
      img = Image.open(path)
      if grayscale:
          img = img.convert("L")
      else:  # Ensure 3 channel even when loaded image is grayscale
          img = img.convert("RGB")
      return img
  
imports: from __future__ import division
  from builtins import range
  from builtins import object
  import random
  import numpy
  from PIL import Image, ImageEnhance
  import math
label_desc: Use image node_id 1 for calling a global function with example usage: load_img(path, grayscale) and returns: img