code: def convert_examples_to_features(
      params, examples, tokenizer, rel2idx, data_sign, ex_params
  ):
      """convert examples to features.
      :param examples (List[InputExamples])
      """
      max_text_len = params.max_seq_length
      # multi-process
      with Pool(10) as p:
          convert_func = functools.partial(
              convert,
              max_text_len=max_text_len,
              tokenizer=tokenizer,
              rel2idx=rel2idx,
              data_sign=data_sign,
              ex_params=ex_params,
          )
          features = p.map(func=convert_func, iterable=examples)
  
      return list(chain(*features))
  
file_path: DeepKE/src/deepke/triple_extraction/PRGC/dataloader_utils.py
imports: import json
  import random
  from multiprocessing import Pool
  import functools
  import numpy
  from collections import defaultdict
  from itertools import chain
  import os
  from .util import Label2IdxSub, Label2IdxObj
label_desc: Use image node_id 5 for calling a global function with example usage: convert_examples_to_features(params, examples, tokenizer, rel2idx, data_sign, ex_params) and returns: list