code: def _pad_sent(text_wd, sent_max_len):
      pad_text_wd = []
      for sent_wd in text_wd:
          if len(sent_wd) < sent_max_len:
              pad_num = sent_max_len - len(sent_wd)
              sent_wd.extend([WORD_PAD] * pad_num)
          else:
              sent_wd = sent_wd[:sent_max_len]
          pad_text_wd.append(sent_wd)
      return pad_text_wd
  
imports: import os
  import numpy
  from functools import partial
  from .pipe import Pipe
  from .utils import _drop_empty_instance
  from ..loader.summarization import ExtCNNDMLoader
  from ..data_bundle import DataBundle
  from ...core.vocabulary import Vocabulary
label_desc: Use image node_id 4 for calling a global function with example usage: _pad_sent(text_wd, sent_max_len) and returns: pad_text_wd