code: def _read_triplets_as_list(filename, entity_dict, relation_dict):
      l = []
      for triplet in _read_triplets(filename):
          s = entity_dict[triplet[0]]
          r = relation_dict[triplet[1]]
          o = entity_dict[triplet[2]]
          l.append([s, r, o])
      return l
  
imports: from __future__ import absolute_import
  import os, sys
  import pickle
  import networkx
  import numpy
  import scipy.sparse
  from ..None import backend
  from ..convert import graph
  from ..utils import retry_method_with_fix
  from .dgl_dataset import DGLBuiltinDataset
  from .utils import _get_dgl_url, deprecate_function, deprecate_property, download, extract_archive, generate_mask_tensor, get_download_dir, load_graphs, load_info, makedirs, save_graphs, save_info
label_desc: Use image node_id 3 for calling a global function with example usage: _read_triplets_as_list(filename, entity_dict, relation_dict) and returns: l