code: def hex_to_rgb(value):
      """
      Calculates rgb values from a hex color code.
  
      :param (string) value: Hex color string
  
      :rtype (tuple) (r_value, g_value, b_value): tuple of rgb values
      """
      value = value.lstrip("#")
      hex_total_length = len(value)
      rgb_section_length = hex_total_length // 3
      return tuple(
          int(value[i : i + rgb_section_length], 16)
          for i in range(0, hex_total_length, rgb_section_length)
      )
  
imports: from __future__ import absolute_import
  import decimal
  from numbers import Number
  import six
  from _plotly_utils import exceptions
  from .None import qualitative, sequential, diverging, cyclical, cmocean, colorbrewer, carto, plotlyjs
label_desc: Use image node_id 15 for calling a global function with example usage: hex_to_rgb(value) and returns: tuple