code: def train_op(x, xl):
      g, v = gv(x, xl)  # returns gradients, loss
      opt(lr, g)
      model_ema.update_ema()
      return v
  
file_path: objax/examples/image_classification/mnist_dnn.py
imports: import os
  import numpy
  import tensorflow_datasets
  from tqdm import trange
  import objax
  from objax.functional import leaky_relu, one_hot
  from objax.jaxboard import SummaryWriter, Summary
  from objax.util import EasyDict
  from objax.zoo.dnnet import DNNet
label_desc: Use image node_id 2 for calling a global function with example usage: train_op(x, xl) and returns: v