code: def base64_2_html(img):
      try:
          html = (
              '<img src="data:image/png;base64,' + img + '"></img>'
          )  # py2
      except Exception:
          img = img.decode("utf-8")
          html = (
              '<img src="data:image/png;base64,' + img + '"></img>'
          )  # py3
      return html
  
file_path: sklearn-evaluation/src/sklearn_evaluation/report/serialize.py
imports: from functools import reduce
  import base64
  from six import BytesIO
  import matplotlib
label_desc: Use image node_id 2 for calling a global function with example usage: base64_2_html(img) and returns: html