code: def xyz_to_rgb(input, name=None):
      """
      Convert a CIE XYZ image to RGB.
  
      Args:
        input: A 3-D (`[H, W, 3]`) or 4-D (`[N, H, W, 3]`) Tensor.
        name: A name for the operation (optional).
  
      Returns:
        A 3-D (`[H, W, 3]`) or 4-D (`[N, H, W, 3]`) Tensor.
      """
      input = tf.convert_to_tensor(input)
      assert input.dtype in (tf.float16, tf.float32, tf.float64)
  
      # inv of:
      # [[0.412453, 0.35758 , 0.180423],
      #  [0.212671, 0.71516 , 0.072169],
      #  [0.019334, 0.119193, 0.950227]]
      kernel = tf.constant(
          [
              [3.24048134, -1.53715152, -0.49853633],
              [-0.96925495, 1.87599, 0.04155593],
              [0.05564664, -0.20404134, 1.05731107],
          ],
          input.dtype,
      )
      value = tf.tensordot(
          input, tf.transpose(kernel), axes=((-1,), (0,))
      )
      value = tf.where(
          tf.math.greater(value, 0.0031308),
          tf.math.pow(value, 1.0 / 2.4) * 1.055 - 0.055,
          value * 12.92,
      )
      return tf.clip_by_value(value, 0, 1)
  
imports: import tensorflow
label_desc: Use image node_id 18 for calling a global function with example usage: xyz_to_rgb(input, name) and returns: tf