code: def source_pad_concat_convert(x_seqs, eos_id=2, bos_id=1):
      """
      This function is used when testing the model without target input.
      """
      x_block = _concat_examples(x_seqs, padding=0)
  
      # add EOS
      x_block = np.pad(
          x_block, ((0, 0), (0, 1)), "constant", constant_values=0
      )
      for i_batch, seq in enumerate(x_seqs):
          x_block[i_batch, len(seq)] = eos_id
      return x_block
  
file_path: texar/examples/transformer/utils/data_utils.py
imports: import os
  import codecs
  import six
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: source_pad_concat_convert(x_seqs, eos_id, bos_id) and returns: x_block