code: def rgb_to_hex(color):
      """
      Converts from rgb to hex
  
      Parameters:
      -----------
              color : string
                      Color representation on hex or rgb
  
      Example:
              rgb_to_hex('rgb(23,25,24)')
      """
      rgb = eval(color.replace("rgb", ""))
      # return '#'+''.join(map(chr, rgb)).encode('hex')
      return "#" + "".join(["{0:02x}".format(x).upper() for x in rgb])
  
imports: import numpy
  import colorsys
  import colorlover
  import operator
  import copy
  from collections import deque
  from six import string_types
  from IPython.display import HTML, display
  from .utils import inverseDict
  from .auth import get_config_file
label_desc: Use image node_id 4 for calling a global function with example usage: rgb_to_hex(color) and returns: unknown