code: def tensorflow_quantile_loss(y, y_pred, quantile):
      """Computes quantile loss for tensorflow.
  
      Standard quantile loss as defined in the "Training Procedure" section of
      the main TFT paper
  
      Args:
        y: Targets
        y_pred: Predictions
        quantile: Quantile to use for loss calculations (between 0 & 1)
  
      Returns:
        Tensor for quantile loss.
      """
  
      # Checks quantile
      if quantile < 0 or quantile > 1:
          raise ValueError(
              "Illegal quantile value={}! Values should be between 0 and 1.".format(
                  quantile
              )
          )
  
      prediction_underflow = y - y_pred
      q_loss = quantile * tf.maximum(prediction_underflow, 0.0) + (
          1.0 - quantile
      ) * tf.maximum(-prediction_underflow, 0.0)
  
      return tf.reduce_sum(q_loss, axis=-1)
  
file_path: qlib/examples/benchmarks/TFT/libs/utils.py
imports: import os
  import pathlib
  import numpy
  import tensorflow
  from tensorflow.python.tools.inspect_checkpoint import print_tensors_in_checkpoint_file
label_desc: Use image node_id 3 for calling a global function with example usage: tensorflow_quantile_loss(y, y_pred, quantile) and returns: tf