code: def _image_url(
      array, fmt="png", mode="data", quality=90, domain=None
  ):
      """Create a data URL representing an image from a PIL.Image.
  
      Args:
        image: a numpy array
        mode: presently only supports "data" for data URL
  
      Returns:
        URL representing image
      """
      supported_modes = "data"
      if mode not in supported_modes:
          message = "Unsupported mode '%s', should be one of '%s'."
          raise ValueError(message, mode, supported_modes)
  
      image_data = serialize_array(
          array, fmt=fmt, quality=quality, domain=domain
      )
      base64_byte_string = base64.b64encode(image_data).decode("ascii")
      return (
          "data:image/" + fmt.upper() + ";base64," + base64_byte_string
      )
  
file_path: lucid/lucid/misc/io/showing.py
imports: from __future__ import absolute_import, division, print_function
  from io import BytesIO
  import base64
  import logging
  import numpy
  import IPython.display
  from string import Template
  import tensorflow
  from lucid.misc.io.serialize_array import serialize_array, array_to_jsbuffer
  from lucid.misc.io.collapse_channels import collapse_channels
label_desc: Use image node_id 2 for calling a global function with example usage: _image_url(array, fmt, mode, quality, domain) and returns: unknown