code: def compute_bleu_summaries(hook_args):
      """Compute BLEU core summaries using the decoder output.
  
      Args:
        hook_args: DecodeHookArgs namedtuple
      Returns:
        A list of tf.Summary values if hook_args.hparams contains the
        reference file and the translated file.
      """
      decode_hparams = hook_args.decode_hparams
  
      if not (
          decode_hparams.decode_reference
          and decode_hparams.decode_to_file
      ):
          return None
  
      values = []
      bleu = 100 * bleu_hook.bleu_wrapper(
          decode_hparams.decode_reference, decode_hparams.decode_to_file
      )
      values.append(tf.Summary.Value(tag="BLEU", simple_value=bleu))
      tf.logging.info(
          "%s: BLEU = %6.2f" % (decode_hparams.decode_to_file, bleu)
      )
      if hook_args.hparams.mlperf_mode:
          current_step = decode_hparams.mlperf_decode_step
          mlperf_log.transformer_print(
              key=mlperf_log.EVAL_TARGET,
              value=decode_hparams.mlperf_threshold,
          )
          mlperf_log.transformer_print(
              key=mlperf_log.EVAL_ACCURACY,
              value={
                  "epoch": max(
                      current_step // decode_hparams.iterations_per_loop
                      - 1,
                      0,
                  ),
                  "value": bleu,
              },
          )
          mlperf_log.transformer_print(key=mlperf_log.EVAL_STOP)
  
      if bleu >= decode_hparams.mlperf_threshold:
          decode_hparams.set_hparam("mlperf_success", True)
  
      return values
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import gzip
  import os
  import tarfile
  import zipfile
  from tensor2tensor.data_generators import cleaner_en_xx
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.data_generators import text_problems
  from tensor2tensor.utils import bleu_hook
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import mlperf_log
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling a global function with example usage: compute_bleu_summaries(hook_args) and returns: values, None