code: def compute_accuracy(labels, logits):
      """Compute accuracy for a single batch of data, given the precomputed logits
      and expected labels. The returned accuracy is normalized by the batch size.
  
      """
      current_batch_size = tf.cast(labels.shape[0], tf.float32)
  
      # logits is the percent chance; this gives the category for each.
      predictions = tf.argmax(logits, axis=1)
  
      # return the average number of items equal to their label.
      return (
          tf.reduce_sum(
              tf.cast(tf.equal(labels, predictions), tf.float32)
          )
          / current_batch_size
      )
  
imports: from __future__ import division, print_function
  import getpass
  from typing import Dict, Optional
  import fs
  import tensorflow
  import tensorflow_datasets
  import tqdm
  import uv
  import uv.tensorflow.reporter
  import uv.util
  from absl import app
  from uv.fs.reporter import FSReporter
  from uv.mlflow.reporter import MLFlowReporter
  from trainer import cli
label_desc: Use image node_id 5 for calling a global function with example usage: compute_accuracy(labels, logits) and returns: unknown