code: def accuracy(labels, preds):
      """Calculates the accuracy of predictions.
  
      Args:
          labels: The ground truth values. A Tensor of the same shape of
              :attr:`preds`.
          preds: A Tensor of any shape containing the predicted values.
  
      Returns:
          A float scalar Tensor containing the accuracy.
      """
      labels = tf.cast(labels, preds.dtype)
      return tf.reduce_mean(
          tf.cast(tf.equal(preds, labels), tf.float32)
      )
  
label_desc: Use image node_id 1 for calling a global function with example usage: accuracy(labels, preds) and returns: tf