code: def eval_step(params, batch, config, label_smoothing=0.0):
      """Calculate evaluation metrics on a batch."""
      inputs, targets = batch["inputs"], batch["targets"]
      weights = jnp.where(targets > 0, 1.0, 0.0)
      logits = models.Transformer(config).apply(
          {"params": params}, inputs, targets
      )
  
      return compute_metrics(logits, targets, weights, label_smoothing)
  
imports: import collections
  import functools
  import os
  from absl import logging
  from clu import metric_writers
  from clu import periodic_actions
  from flax import jax_utils
  from flax import linen
  from flax.training import checkpoints
  from flax.training import common_utils
  from flax.training import dynamic_scale
  from flax.training import train_state
  import jax
  import jax.numpy
  import ml_collections
  import numpy
  import optax
  import tensorflow
  import bleu
  import decode
  import input_pipeline
  import models
label_desc: Use image node_id 7 for calling a global function with example usage: eval_step(params, batch, config, label_smoothing) and returns: compute_metrics