code: def _hex2rgb(hex_c, alpha):
      hex_s = hex_c.lstrip("#")
      list_rgb = [int(hex_s[i : i + 2], 16) for i in (0, 2, 4)]
      if alpha is not None:
          list_rgb.append(int(alpha + 0.5))
      return list_rgb
  
file_path: lets-plot/python-package/lets_plot/plot/geom_imshow_.py
imports: import base64
  import io
  from .core import aes
  from .geom import _geom
  from .scale import scale_gradientn
  from .scale import scale_grey
  from .util import as_boolean
  from .util import is_ndarray
label_desc: Use image node_id 1 for calling a global function with example usage: _hex2rgb(hex_c, alpha) and returns: list_rgb