def METHOD_NAME(enc, src_i, src_s, tgt_i, tgt_s):
  """Creates TfExample from the encoded results."""
  src_i = list(src_i) + [enc.sentence_end_id]
  src_s = list(src_s) + [enc.sentence_end_string]
  if FLAGS.max_len > 0 and len(src_i) > FLAGS.max_len:
    return None
  tgt_l = list(tgt_i) + [enc.sentence_end_id]
  tgt_i = [enc.sentence_start_id] + list(tgt_i)
  tgt_s = [enc.sentence_start_string] + list(tgt_s)
  if FLAGS.max_len > 0 and len(tgt_i) > FLAGS.max_len:
    return None
  feature = {
      'source_id': _MakeInt64Feature(src_i),
      'source_padding': _MakeFloatFeature(np.zeros_like(src_i)),
      'source_word': _MakeBytesFeature(src_s),
      'target_id': _MakeInt64Feature(tgt_i),
      'target_padding': _MakeFloatFeature(np.zeros_like(tgt_i)),
      'target_word': _MakeBytesFeature(tgt_s),
      'target_label': _MakeInt64Feature(tgt_l),
      'target_weight': _MakeFloatFeature(np.ones_like(tgt_l)),
      'natural_order': _MakeInt64Feature([1]),
  }
  return tf.train.Example(features=tf.train.Features(feature=feature))