code: def _internal_eval(
      model,
      global_step,
      sess,
      iterator,
      iterator_feed_dict,
      summary_writer,
      label,
  ):
      """Computing perplexity."""
      sess.run(iterator.initializer, feed_dict=iterator_feed_dict)
      ppl = model_helper.compute_perplexity(model, sess, label)
      utils.add_summary(
          summary_writer, global_step, "%s_ppl" % label, ppl
      )
      return ppl
  
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 17 for calling a global function with example usage: _internal_eval(model, global_step, sess, iterator, iterator_feed_dict, summary_writer, label) and returns: ppl