class_docstr: Read a knowledge graph to memory
class_docstr_tok: ["Read","a","knowledge","graph","to","memory"]
docstr: Given a relation id (from vocab), get the id of the inverse relation.
docstr_tok: ["Given","a","relation","id","(","from","vocab",")",",","get","the","id","of","the","inverse","relation","."]
code: def get_inverse_relation_from_id(self, r):
      """Given a relation id (from vocab), get the id of the inverse relation."""
      rname = self.inverse_relation_vocab[r]
      inv_rname = self.get_inverse_relation_from_name(rname)
      inv_r = self.relation_vocab[inv_rname]
      return inv_r
  
file_path: neural-structured-learning/research/a2n/graph.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from collections import defaultdict
  import csv
  from absl import logging
  import numpy
label_desc: Use image node_id 3 for calling the Graph obj's underlying member method code with example usage: obj.get_inverse_relation_from_id(r) and returns: inv_r