code: def to_bigdl_metric(metric):
      metric = metric.lower()
      if metric == "accuracy" or metric == "acc":
          return zmetrics.Accuracy()
      elif metric == "top5accuracy" or metric == "top5acc":
          return zmetrics.Top5Accuracy()
      elif metric == "mae":
          from bigdl.dllib.optim.optimizer import MAE
  
          return MAE()
      elif metric == "auc":
          return zmetrics.AUC()
      elif metric == "treennaccuracy":
          from bigdl.dllib.optim.optimizer import TreeNNAccuracy
  
          return TreeNNAccuracy()
      else:
          invalidInputError(False, "Unsupported metric: %s" % metric)
  
imports: from bigdl.orca.tfpark.tfnet import TFNet
  from bigdl.orca.tfpark.tf_optimizer import BigDLMetric, TFModel
  from bigdl.dllib.keras import metrics
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 1 for calling a global function with example usage: to_bigdl_metric(metric) and returns: zmetrics, zmetrics, MAE, zmetrics, TreeNNAccuracy