code: def reduce_opacity(im, opacity):
      """Returns an image with reduced opacity."""
      assert opacity >= 0 and opacity <= 1
      if im.mode != "RGBA":
          im = im.convert("RGBA")
      else:
          im = im.copy()
      alpha = im.split()[3]
      alpha = ImageEnhance.Brightness(alpha).enhance(opacity)
      im.putalpha(alpha)
      return im
  
file_path: TimeSide/timeside/plugins/grapher/utils.py
imports: import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: reduce_opacity(im, opacity) and returns: im