code: def _format_results(name, ppl, scores, metrics):
      """Format results."""
      result_str = ""
      if ppl:
          result_str = "%s ppl %.2f" % (name, ppl)
      if scores:
          for metric in metrics:
              if result_str:
                  result_str += ", %s %s %.1f" % (
                      name,
                      metric,
                      scores[metric],
                  )
              else:
                  result_str = "%s %s %.1f" % (
                      name,
                      metric,
                      scores[metric],
                  )
      return result_str
  
imports: from __future__ import print_function
  import math
  import os
  import random
  import time
  import tensorflow
  from .None import inference, gnmt_model
  from .gnmt import attention_model, model
  from .gnmt import model_helper
  from .gnmt.utils import nmt_utils, misc_utils
label_desc: Use image node_id 15 for calling a global function with example usage: _format_results(name, ppl, scores, metrics) and returns: result_str