code: def accuracy(logits, labels):
      predictions = tf.argmax(logits, axis=1, output_type=labels.dtype)
      is_correct = tf.cast(
          tf.equal(predictions, labels), dtype=tf.float32
      )
      return tf.reduce_mean(is_correct)
  
file_path: BigDL/python/orca/example/tfpark/tf_optimizer/train.py
imports: import tensorflow
  from bigdl.dllib.nncontext import init_nncontext
  from bigdl.orca.tfpark import TFOptimizer, TFDataset
  from bigdl.dllib.optim.optimizer import *
  from bigdl.dllib.utils.common import *
  import numpy
  from bigdl.dllib.feature.dataset import mnist
  from bigdl.dllib.feature.dataset.transformer import *
  from bigdl.dllib.utils.log4Error import invalidInputError
  import os
  import sys
  import argparse
  from nets import lenet
label_desc: Use image node_id 1 for calling a global function with example usage: accuracy(logits, labels) and returns: tf