code: def get_neighbor_list_wikikg2():
      from ogb.linkproppred import LinkPropPredDataset
  
      dataset = LinkPropPredDataset(name="ogbl-wikikg2")
      split_edge = dataset.get_edge_split()
      train_edges = split_edge["train"]
  
      head_id = train_edges["head"].reshape((-1, 1))
      tail_id = train_edges["tail"].reshape((-1, 1))
      relation_id = train_edges["relation"]
  
      edges = np.concatenate([head_id, tail_id], axis=-1)
      n_entities = 2500604
      graph = pgl.Graph(
          num_nodes=n_entities,
          edges=edges,
          edge_feat={"edge_feature": relation_id},
      )
  
      entity_neighbors = []
      for nid in tqdm(range(n_entities)):
          nb = [[], [], []]
          # nid-head
          succ, succ_eid = graph.successor([nid], return_eids=True)
          nb[0].extend(list(succ[0]))
          nb[1].extend(
              list(graph.edge_feat["edge_feature"][list(succ_eid[0])])
          )
          nb[2].extend([-1] * len(succ[0]))
  
          # nid-tail
          pred, pred_eid = graph.predecessor([nid], return_eids=True)
          nb[0].extend(list(pred[0]))
          nb[1].extend(
              list(graph.edge_feat["edge_feature"][list(pred_eid[0])])
          )
          nb[2].extend([1] * len(pred[0]))
          entity_neighbors.append(nb)
      return entity_neighbors, None
  
file_path: PGL/apps/Graph4KG/examples/REP/rep.py
imports: import os
  import time
  import logging
  import argparse
  import numpy
  from tqdm import tqdm
  import pgl
  from ote_orth import OrthOTE
label_desc: Use image node_id 1 for calling a global function with example usage: get_neighbor_list_wikikg2() and returns: entity_neighbors,  None