code: def evaluate_string_metrics(
      *,
      sess,
      string_metrics,
      dataset,
      inputs,
      targets=None,
      outputs=None,
      loss=None,
  ):
      metrics = {}
      for i, metric in enumerate(string_metrics):
          if metric == "loss":
              assert (
                  loss is not None
              ), "loss tensor should not be None if one of the metrics is loss"
              metrics["loss"] = loss
          else:
              assert (
                  outputs is not None
              ), "outputs should not be None if non loss metrics exists"
              assert (
                  targets is not None
              ), "targets should not be None if non loss metrics exists"
  
              method = to_bigdl_metric(metric)
              metrics[metric] = BigDLMetric(method, outputs, targets)
      result = evaluate_metrics(inputs, sess, dataset, metrics)
      return result
  
imports: from zoo.tfpark.tfnet import TFNet
  from zoo.tfpark.tf_optimizer import BigDLMetric, TFModel
  from zoo.pipeline.api.keras import metrics
label_desc: Use image node_id 2 for calling a global function with example usage: evaluate_string_metrics() and returns: result