class_docstr: Class for ranking of paths in subgraph
class_docstr_tok: ["Class","for","ranking","of","paths","in","subgraph"]
code: def load(self) -> None:
      if self.rel_q2name_filename.endswith("pickle"):
          self.rel_q2name = load_pickle(
              self.load_path / self.rel_q2name_filename
          )
      elif self.rel_q2name_filename.endswith("json"):
          self.rel_q2name = read_json(
              self.load_path / self.rel_q2name_filename
          )
  
file_path: DeepPavlov/deeppavlov/models/kbqa/rel_ranking_infer.py
imports: from logging import getLogger
  from typing import Tuple, List, Any, Optional
  from scipy.special import softmax
  from deeppavlov.core.common.chainer import Chainer
  from deeppavlov.core.common.file import load_pickle, read_json
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.models.component import Component
  from deeppavlov.core.models.serializable import Serializable
  from deeppavlov.models.kbqa.sentence_answer import sentence_answer
  from deeppavlov.models.kbqa.wiki_parser import WikiParser
label_desc: Use image node_id 2 for calling the RelRankerInfer obj's underlying member method code with example usage: obj.load() without return types