code: def _pad_label(label, doc_max_timesteps):
      text_len = len(label)
      if text_len < doc_max_timesteps:
          pad_label = label + [0] * (doc_max_timesteps - text_len)
      else:
          pad_label = label[:doc_max_timesteps]
      return pad_label
  
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 6 for calling a global function with example usage: _pad_label(label, doc_max_timesteps) and returns: pad_label