code: def rgba_to_hsla(r, g, b, alpha=1.0):
      """Converts a color given by its RGBA coordinates to HSLA coordinates
      (hue, saturation, lightness, alpha).
  
      Each of the RGBA coordinates must be in the range [0, 1].
      """
      alpha = float(alpha)
      rgb_min, rgb_max = float(min(r, g, b)), float(max(r, g, b))
  
      if rgb_min == rgb_max:
          return 0.0, 0.0, rgb_min, alpha
  
      lightness = (rgb_min + rgb_max) / 2.0
      d = rgb_max - rgb_min
      if lightness > 0.5:
          sat = d / (2 - rgb_max - rgb_min)
      else:
          sat = d / (rgb_max + rgb_min)
  
      d *= 6.0
      if rgb_max == r:
          hue = (g - b) / d
          if g < b:
              hue += 1
      elif rgb_max == g:
          hue = 1 / 3.0 + (b - r) / d
      else:
          hue = 2 / 3.0 + (r - g) / d
      return hue, sat, lightness, alpha
  
imports: from abc import ABCMeta, abstractmethod
  from math import ceil
label_desc: Use image node_id 10 for calling a global function with example usage: rgba_to_hsla(r, g, b, alpha) and returns: hue,  sat,  lightness,  alpha, int,  int,  rgb_min,  alpha