code: def image_entropy(im):
      # greyscale image entropy
      # band = np.asarray(im.convert("L"))
      band = np.asarray(im.convert("1"), dtype=np.uint8)
      hist, _ = np.histogram(band, bins=range(0, 256))
      hist = hist[hist > 0]
      return -np.log2(hist / hist.sum()).sum()
  
imports: import cv2
  import requests
  import os
  import numpy
  from PIL import ImageDraw
  from modules import paths_internal
  from pkg_resources import parse_version
label_desc: Use image node_id 6 for calling a global function with example usage: image_entropy(im) and returns: unknown