code: def lab2xyz(lab, illuminant="D65", observer="2"):
      """CIE-LAB to XYZcolor space conversion.
      Parameters
      ----------
      lab : array_like
          The image in lab format, in a 3-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 XYZ format, in a 3-D array of shape ``(.., .., 3)``.
      Raises
      ------
      ValueError
          If `lab` is not a 3-D array of shape ``(.., .., 3)``.
      ValueError
          If either the illuminant or the observer angle are not supported or
          unknown.
      UserWarning
          If any of the pixels are invalid (Z < 0).
      Notes
      -----
      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.
      References
      ----------
      .. [1] http://www.easyrgb.com/index.php?X=MATH&H=07#text7
      .. [2] https://en.wikipedia.org/wiki/Lab_color_space
      """
  
      arr = _prepare_colorarray(lab).copy()
  
      L, a, b = arr[:, :, 0], arr[:, :, 1], arr[:, :, 2]
      y = (L + 16.0) / 116.0
      x = (a / 500.0) + y
      z = y - (b / 200.0)
  
      if np.any(z < 0):
          invalid = np.nonzero(z < 0)
          warn(
              "Color data out of range: Z < 0 in %s pixels"
              % invalid[0].size,
              stacklevel=2,
          )
          z[invalid] = 0
  
      out = np.dstack([x, y, z])
  
      mask = out > 0.2068966
      out[mask] = np.power(out[mask], 3.0)
      out[~mask] = (out[~mask] - 16.0 / 116.0) / 7.787
  
      # rescale to the reference white (illuminant)
      xyz_ref_white = get_xyz_coords(illuminant, observer)
      out *= xyz_ref_white
      return out
  
imports: import numpy
  from scipy import linalg
  from warnings import warn
label_desc: Use image node_id 2 for calling a global function with example usage: lab2xyz(lab, illuminant, observer) and returns: out