code: def im_watermark(
      im, inputtext, font=None, color=None, opacity=0.6, margin=(30, 30)
  ):
      """imprints a PIL image with the indicated text in lower-right corner"""
      if im.mode != "RGBA":
          im = im.convert("RGBA")
      textlayer = Image.new("RGBA", im.size, (0, 0, 0, 0))
      textdraw = ImageDraw.Draw(textlayer)
      textsize = textdraw.textsize(inputtext, font=font)
      textpos = [im.size[i] - textsize[i] - margin[i] for i in [0, 1]]
      textdraw.text(textpos, inputtext, font=font, fill=color)
      if opacity != 1:
          textlayer = reduce_opacity(textlayer, opacity)
      return Image.composite(textlayer, im, textlayer)
  
file_path: TimeSide/timeside/plugins/grapher/utils.py
imports: import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: im_watermark(im, inputtext, font, color, opacity, margin) and returns: Image