code: def bleu_format(examples, tgt_dict, num_batches, batch_size, eos=0):
      """
      BLEU score
      """
      sents = [
          examples[ex, b, :]
          for b, ex in itt.product(
              range(num_batches), range(batch_size)
          )
      ]
      return [
          " ".join(
              [tgt_dict[k].decode("utf-8") for k in sent if k != eos]
          )
          for sent in sents
      ]
  
file_path: neon/examples/nmt/train.py
imports: from neon.backends import gen_backend
  from neon.data.text import TextNMT
  from neon.initializers import Uniform
  from neon.layers import GeneralizedCost, Affine, GRU, Seq2Seq, LookupTable
  from neon.models import Model
  from neon.optimizers import RMSProp
  from neon.transforms import Tanh, Logistic, Softmax, CrossEntropyMulti
  from neon.callbacks.callbacks import Callbacks
  from neon.util.argparser import NeonArgparser, extract_valid_args
  from neon.transforms.cost import BLEUScore
  import os
  import itertools
label_desc: Use image node_id 1 for calling a global function with example usage: bleu_format(examples, tgt_dict, num_batches, batch_size, eos) and returns: unknown