code: def _get_label(font_path, labelstr, rgb):
      # pylint: disable=import-outside-toplevel
      from PIL import Image
      from PIL import ImageDraw
      from PIL import ImageFont
  
      text = labelstr
      textSize = 25
      colorText = "black"
      testDraw = ImageDraw.Draw(Image.new("RGB", (1, 1)))
      font = ImageFont.truetype(font_path, textSize)
      width = int(testDraw.textlength(labelstr, font=font))
      height = textSize + 5
      img = Image.new(
          "RGB",
          (width, height),
          color=(
              int(rgb[0] * 255),
              int(rgb[1] * 255),
              int(rgb[2] * 255),
          ),
      )
      d = ImageDraw.Draw(img)
      d.text((0, 0), text, fill=colorText, font=font)
      opencvImage = np.divide(np.asarray(img), 255)
      return opencvImage.transpose(2, 0, 1)
  
imports: from __future__ import division
  import math
  from collections import namedtuple
  from functools import cmp_to_key
  import numpy
label_desc: Use image node_id 18 for calling a global function with example usage: _get_label(font_path, labelstr, rgb) and returns: opencvImage