code: def convert_image_str_to_pil(image_str: str) -> PILImage.Image:
      # Convert base64 string to PIL image.
      image_str = image_str[image_str.find(";base64,") + 8 :]
      img_bytes = base64.b64decode(image_str.encode())
      return PILImage.open(io.BytesIO(img_bytes))
  
file_path: lit/lit_nlp/lib/image_utils.py
imports: import base64
  import io
  from typing import Optional
  import matplotlib.cm
  import numpy
  from PIL import Image
  from PIL import ImageEnhance
label_desc: Use image node_id 1 for calling a global function with example usage: convert_image_str_to_pil(image_str) and returns: PILImage