class_docstr: Task class for text sequence to sequence.
class_docstr_tok: ["Task","class","for","text","sequence","to","sequence","."]
code: def exclude_padding(self, batch):
      x_binary = tf.cast(tf.not_equal(batch, utils.PAD_IDX), tf.int32)
      sen_lens = tf.reduce_sum(x_binary, axis=-1)
      return batch[:sen_lens]
  
imports: import collections
  import os
  import delta.compat
  from absl import logging
  from delta import utils
  from delta.data.preprocess.text_ops import tokenize_sentence
  from delta.data.preprocess.utils import load_vocab_dict
  from delta.data.task.base_text_task import TextTask
  from delta.data.preprocess.text_ops import load_textline_dataset
  from delta.data.utils.common_utils import get_file_len
  from delta.layers.utils import compute_sen_lens
  from delta.utils.register import registers
label_desc: Use image node_id 4 for calling the TextS2STask obj's underlying member method code with example usage: obj.exclude_padding(batch) and returns: batch