code: def _pad_batch_records(
      self, batch_records: List, phase: str = None
  ) -> List:
      batch_token_ids = [record.token_ids for record in batch_records]
      batch_text_type_ids = [
          record.text_type_ids for record in batch_records
      ]
      batch_position_ids = [
          record.position_ids for record in batch_records
      ]
  
      padded_token_ids, input_mask, batch_seq_lens = pad_batch_data(
          batch_token_ids,
          max_seq_len=self.max_seq_len,
          pad_idx=self.pad_id,
          return_input_mask=True,
          return_seq_lens=True,
      )
      padded_text_type_ids = pad_batch_data(
          batch_text_type_ids,
          max_seq_len=self.max_seq_len,
          pad_idx=self.pad_id,
      )
      padded_position_ids = pad_batch_data(
          batch_position_ids,
          max_seq_len=self.max_seq_len,
          pad_idx=self.pad_id,
      )
  
      return_list = [
          padded_token_ids,
          padded_position_ids,
          padded_text_type_ids,
          input_mask,
          batch_seq_lens,
      ]
      if phase != "predict":
          batch_labels = [record.label_id for record in batch_records]
          batch_labels = (
              np.array(batch_labels).astype("int64").reshape([-1, 1])
          )
          return_list += [batch_labels]
  
      return return_list
  
imports: from collections import namedtuple
  from typing import Callable, Generator, Generic, List
  import numpy
  from paddlehub.utils.log import logger
  from paddlehub.compat.task import tokenization
  from paddlehub.compat.task.batch import pad_batch_data
label_desc: Use image node_id 1 for calling the ClassifyReader obj's underlying member method code with example usage: obj._pad_batch_records(batch_records, phase) and returns: return_list