code: def rgb2lab(rgb, illuminant="D65", observer="2"):
      """RGB to lab color space conversion.
      Parameters
      ----------
      rgb : array_like
          The image in RGB format, in a 3- or 4-D array of shape
          ``(.., ..,[ ..,] 3)``.
      illuminant : {"A", "D50", "D55", "D65", "D75", "E"}, optional
          The name of the illuminant (the function is NOT case sensitive).
      observer : {"2", "10"}, optional
          The aperture angle of the observer.
      Returns
      -------
      out : ndarray
          The image in Lab format, in a 3- or 4-D array of shape
          ``(.., ..,[ ..,] 3)``.
      Raises
      ------
      ValueError
          If `rgb` is not a 3- or 4-D array of shape ``(.., ..,[ ..,] 3)``.
      References
      ----------
      .. [1] https://en.wikipedia.org/wiki/Standard_illuminant
      Notes
      -----
      This function uses rgb2xyz and xyz2lab.
      By default Observer= 2A, Illuminant= D65. CIE XYZ tristimulus values
      x_ref=95.047, y_ref=100., z_ref=108.883. See function `get_xyz_coords` for
      a list of supported illuminants.
      """
      return xyz2lab(rgb2xyz(rgb), illuminant, observer)
  
imports: import numpy
  from scipy import linalg
  from warnings import warn
label_desc: Use image node_id 5 for calling a global function with example usage: rgb2lab(rgb, illuminant, observer) and returns: xyz2lab