code: def bleu_score(logits, labels):
    
    predictions = tf.to_int32(tf.argmax(logits, axis=-1))
    # TODO: Look into removing use of py_func
    bleu = tf.py_func(compute_bleu, (labels, predictions), tf.float32)
    return bleu, tf.constant(1.0)
docs: Approximate BLEU score computation between labels and predictions.
  
    An approximate BLEU scoring method since we do not glue word pieces or
    decode the ids and tokenize the output. By default, we use ngram order of 4
    and use brevity penalty. Also, this does not have beam search.
  
    Args:
      logits: Tensor of size [batch_size, length_logits, vocab_size]
      labels: Tensor of size [batch-size, length_labels]
  
    Returns:
      bleu: int, approx bleu score