docstr: Returns a list[dict] including all the input information what the model need.
  Args:
      examples (list): the data example, returned by _read_file.
      phase (str): the processing phase, can be 'train' 'dev' 'test' or 'predict'.
  Returns:
      a list with all the examples record.
docstr_tok: ["Returns","a","list","[","dict","]","including","all","the","input","information","what","the","model","need",".","Args",":","examples","(","list",")",":","the","data","example",",","returned","by","_read_file",".","phase","(","str",")",":","the","processing","phase",",","can","be","'train","'","'dev","'","'test","'","or","'predict","'",".","Returns",":","a","list","with","all","the","examples","record","."]
code: def _convert_examples_to_records(self, examples, phase):
      """
      Returns a list[dict] including all the input information what the model need.
      Args:
          examples (list): the data example, returned by _read_file.
          phase (str): the processing phase, can be 'train' 'dev' 'test' or 'predict'.
      Returns:
          a list with all the examples record.
      """
      records = []
      with tqdm(total=len(examples)) as process_bar:
          for example in examples:
              record = self.tokenizer.encode(
                  text=example.text_a.split(self.split_char),
                  text_pair=example.text_b.split(self.split_char)
                  if example.text_b
                  else None,
                  max_seq_len=self.max_seq_len,
              )
              if example.label:
                  expand_label = (
                      [self.start_token]
                      + example.label.split(self.split_char)[
                          : self.max_seq_len - 2
                      ]
                      + [self.end_token]
                  )
                  expand_label_id = [
                      self.label_index.get(
                          label, self.label_index[self.unk_token]
                      )
                      for label in expand_label
                  ]
                  record["label"] = expand_label_id[1:] + [
                      self.label_index[self.end_token]
                  ] * (self.max_seq_len - len(expand_label) + 1)
                  record["dec_input"] = expand_label_id[:-1] + [
                      self.label_index[self.end_token]
                  ] * (self.max_seq_len - len(expand_label) + 1)
              records.append(record)
              process_bar.update(1)
      return records
  
imports: import io
  import csv
  import collections
  import numpy
  from tqdm import tqdm
  from paddlehub.compat.datasets.base_dataset import InputExample, BaseDataset
  from paddlehub.utils.log import logger
  from paddlehub.text.tokenizer import CustomTokenizer
  from paddlehub.text.bert_tokenizer import BertTokenizer
label_desc: Use image node_id 2 for calling the GenerationDataset obj's underlying member method code with example usage: obj._convert_examples_to_records(examples, phase) and returns: records