code: def edge_index_dict(
      self,
  ) -> Dict[Tuple[str, str, str], Union[Dict[str, torch.Tensor], int]]:
      import logging
  
      logger = logging.getLogger("OGBNPapers100MDataset")
  
      if self.__edge_index is None:
          if self.__load_edge_index:
              npy_path = os.path.join(
                  self.__dataset_dir,
                  "ogbn_papers100M",
                  "npy",
                  "paper__cites__paper",
                  "edge_index.npy",
              )
  
              logger.info(f"loading edge index from {npy_path}")
              ei = np.load(npy_path, mmap_mode="r")
              ei = torch.as_tensor(ei)
              ei = {
                  "src": ei[1],
                  "dst": ei[0],
              }
  
              logger.info("sorting edge index...")
              ei["dst"], ix = torch.sort(ei["dst"])
              ei["src"] = ei["src"][ix]
              del ix
              gc.collect()
  
              logger.info("processing replications...")
              orig_num_nodes = (
                  self.num_nodes("paper") // self.__replication_factor
              )
              if self.__replication_factor > 1:
                  orig_src = ei["src"].clone().detach()
                  orig_dst = ei["dst"].clone().detach()
                  for r in range(1, self.__replication_factor):
                      ei["src"] = torch.concat(
                          [
                              ei["src"],
                              orig_src + int(r * orig_num_nodes),
                          ]
                      )
  
                      ei["dst"] = torch.concat(
                          [
                              ei["dst"],
                              orig_dst + int(r * orig_num_nodes),
                          ]
                      )
  
                  del orig_src
                  del orig_dst
  
                  ei["src"] = ei["src"].contiguous()
                  ei["dst"] = ei["dst"].contiguous()
              gc.collect()
  
              logger.info(f"# edges: {len(ei['src'])}")
              self.__edge_index = {("paper", "cites", "paper"): ei}
          else:
              self.__edge_index = {
                  ("paper", "cites", "paper"): self.num_edges(
                      ("paper", "cites", "paper")
                  )
              }
  
      return self.__edge_index
  
imports: from .dataset import Dataset
  from typing import Dict, Tuple, Union
  import pandas
  import torch
  import numpy
  from sklearn.model_selection import train_test_split
  import gc
  import os
  import json
label_desc: Use image node_id 3 for calling the OGBNPapers100MDataset obj's underlying member method code with example usage: obj.edge_index_dict() and returns: self