code: def __init__(self):
      super(ArgParser, self).__init__()
      self.add_argument(
          "--mfile", type=str, default=None, help="ID mapping file."
      )
      self.add_argument(
          "--emb_file",
          type=str,
          default=None,
          help="Numpy file containing the embeddings.",
      )
      self.add_argument(
          "--format",
          type=str,
          help="The format of input data"
          "l_r: two list of objects are provided as left objects and right objects.\n"
          "l_*: one list of objects is provided as left objects list and treat all objects in emb_file as right objects\n"
          "*_r: one list of objects is provided as right objects list and treat all objects in emb_file as left objects\n"
          "*: treat all objects in the emb_file as both left objects and right objects",
      )
      self.add_argument(
          "--data_files",
          type=str,
          default=None,
          nargs="+",
          help="A list of data file names. This is used to provide necessary files containing the requried data "
          "according to the format, e.g., for l_r, two files are required as left_data and right_data; "
          "for l_*, only one file is required; for *, no file is required",
      )
      self.add_argument(
          "--raw_data",
          default=False,
          action="store_true",
          help="whether the data profiled in data_files is in the raw object naming space, e.g. string name of the entity"
          "or in DGL-KE converted integer id space \n"
          "If True, the data is in the original naming space and the inference program will do the id translation"
          "according to id mapping files generated during the training progress. \n"
          "If False, the data is just interger ids and it is assumed that user has already done the id translation",
      )
      self.add_argument(
          "--exec_mode",
          type=str,
          default="all",
          help="How to calculate scores for element pairs and calculate topK: \n"
          "pairwise: both left and right objects are provided with the same length N, and we will calculate the similarity pair by pair:"
          "result = topK([score(l_i, r_i)]) for i in N, the result shape will be (K,)"
          "all: both left and right objects are provided as L and R, and we calculate all possible combinations of (l_i, r_j):"
          "result = topK([[score(l_i, rj) for l_i in L] for r_j in R]), the result shape will be (K,)\n"
          "batch_left: both left and right objects are provided as L and R,, and we calculate topK for each element in L:"
          "result = topK([score(l_i, r_j) for r_j in R]) for l_j in L, the result shape will be (sizeof(L), K)\n",
      )
      self.add_argument(
          "--topK",
          type=int,
          default=10,
          help="How many results are returned",
      )
      self.add_argument(
          "--sim_func",
          type=str,
          default="cosine",
          help="What kind of similarity function is used in ranking and will be output: \n"
          "cosine: use cosine similarity, score = $\frac{x \cdot y}{||x||_2||y||_2}$"
          "l2: use l2 similarity, score = -$||x - y||_2$ \n"
          "l1: use l1 similarity, score = -$||x - y||_1$ \n"
          "dot: use dot product similarity, score = $x \cdot y$ \n"
          "ext_jaccard: use extended jaccard similarity, score = $\frac{x \cdot y}{||x||_{2}^{2} + ||y||_{2}^{2} - x \cdot y}$ \n",
      )
      self.add_argument(
          "--output",
          type=str,
          default="result.tsv",
          help="Where to store the result, should be a single file",
      )
      self.add_argument(
          "--gpu",
          type=int,
          default=-1,
          help="GPU device to use in inference, -1 means CPU",
      )
  
file_path: ogb/examples/lsc/wikikg90m/dgl-ke-ogb-lsc/python/dglke/infer_emb_sim.py
imports: import os
  import time
  import argparse
  from .utils import load_entity_data, load_raw_emb_data, load_raw_emb_mapping
  from .models.infer import EmbSimInfer
label_desc: Use image node_id 1 to create a new ArgParser object from inherited base classes: argparse with example: obj = ArgParser()