code: def pad_batch_data(insts, pad_id=0):
      """Pad the instances to the max sequence length in batch."""
      max_len = max(map(len, insts))
      inst_data = np.array(
          [
              list(inst) + [pad_id] * (max_len - len(inst))
              for inst in insts
          ]
      )
      return inst_data.astype("int64").reshape([-1, max_len, 1])
  
imports: from itertools import chain
  import numpy
  import paddle
label_desc: Use image node_id 3 for calling a global function with example usage: pad_batch_data(insts, pad_id) and returns: inst_data