code: def load_raw_triplet_data(
      head_f=None, rel_f=None, tail_f=None, emap_f=None, rmap_f=None
  ):
      if emap_f is not None:
          eid_map = {}
          id2e_map = {}
          with open(emap_f, "r") as f:
              reader = csv.reader(f, delimiter="\t")
              for row in reader:
                  eid_map[row[1]] = int(row[0])
                  id2e_map[int(row[0])] = row[1]
  
      if rmap_f is not None:
          rid_map = {}
          id2r_map = {}
          with open(rmap_f, "r") as f:
              reader = csv.reader(f, delimiter="\t")
              for row in reader:
                  rid_map[row[1]] = int(row[0])
                  id2r_map[int(row[0])] = row[1]
  
      if head_f is not None:
          head = []
          with open(head_f, "r") as f:
              id = f.readline()
              while len(id) > 0:
                  head.append(eid_map[id[:-1]])
                  id = f.readline()
          head = np.asarray(head)
      else:
          head = None
  
      if rel_f is not None:
          rel = []
          with open(rel_f, "r") as f:
              id = f.readline()
              while len(id) > 0:
                  rel.append(rid_map[id[:-1]])
                  id = f.readline()
          rel = np.asarray(rel)
      else:
          rel = None
  
      if tail_f is not None:
          tail = []
          with open(tail_f, "r") as f:
              id = f.readline()
              while len(id) > 0:
                  tail.append(eid_map[id[:-1]])
                  id = f.readline()
          tail = np.asarray(tail)
      else:
          tail = None
  
      return head, rel, tail, id2e_map, id2r_map
  
file_path: ogb/examples/lsc/wikikg90m/dgl-ke-ogb-lsc/python/dglke/utils.py
imports: import math
  import os
  import csv
  import argparse
  import json
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: load_raw_triplet_data(head_f, rel_f, tail_f, emap_f, rmap_f) and returns: head,  rel,  tail,  id2e_map,  id2r_map