docstr: convert InputExamples to InputFeatures
  :param data_sign: 'train', 'val' or 'test'
docstr_tok: ["convert","InputExamples","to","InputFeatures",":","param","data_sign",":","'train","'",",","'val","'","or","'test","'"]
code: def get_features(self, data_sign, ex_params):
      """convert InputExamples to InputFeatures
      :param data_sign: 'train', 'val' or 'test'
      """
      print("=*=" * 10)
      print("Loading {} data...".format(data_sign))
      # get features
      cache_path = os.path.join(
          self.data_dir,
          "{}.cache.{}".format(data_sign, str(self.max_seq_length)),
      )
      if os.path.exists(cache_path) and self.data_cache:
          features = torch.load(cache_path)
      else:
          # get relation to idx
          with open(
              os.path.join(self.data_dir, f"rel2id.json"),
              "r",
              encoding="utf-8",
          ) as f_re:
              rel2idx = json.load(f_re)[-1]
          # get examples
          if data_sign in (
              "train",
              "val",
              "test",
              "pseudo",
              "EPO",
              "SEO",
              "SOO",
              "Normal",
              "1",
              "2",
              "3",
              "4",
              "5",
          ):
              examples = read_examples(
                  self.data_dir, data_sign=data_sign, rel2idx=rel2idx
              )
          else:
              raise ValueError(
                  "please notice that the data can only be train/val/test!!"
              )
          features = convert_examples_to_features(
              self.params,
              examples,
              self.tokenizer,
              rel2idx,
              data_sign,
              ex_params,
          )
          # save data
          if self.data_cache:
              torch.save(features, cache_path)
      return features
  
file_path: DeepKE/src/deepke/triple_extraction/PRGC/dataloader.py
imports: import os
  import json
  import torch
  from torch.utils.data import DataLoader, RandomSampler, SequentialSampler, Dataset
  from transformers import BertTokenizer
  from .dataloader_utils import read_examples, convert_examples_to_features
label_desc: Use image node_id 4 for calling the CustomDataLoader obj's underlying member method code with example usage: obj.get_features(data_sign, ex_params) and returns: features