class_docstr: Implementation of knowledge graph interface in pglke.
  
  Args:
      triplets (dict):
          Triplet data of knowledge graphs with keys 'train', 'valid' and 'test'.
      num_ents (int, optional):
          Number of entities in a knowledge graph.
          If not provided, it will be inferred from triplets.
      num_rels (int, optional):
          Number of relations in a knowledge graph.
          If not provided, it will be inferred from triplets.
      ent_feat (np.ndarray, optional):
          Entity features, which have consistent order with entity ids.
      rel_feat (np.ndarray, optional):
          Relation features, which have consistent order with relation ids.
docstr: Pretty Print the TriGraph.
          
docstr_tok: ["Pretty","Print","the","TriGraph","."]
code: def __repr__(self):
      """Pretty Print the TriGraph."""
      repr_dict = {"class": self.__class__.__name__}
      repr_dict["num_ents"] = self._num_ents
      repr_dict["num_rels"] = self._num_rels
      repr_dict["ent_feat"] = []
      repr_dict["rel_feat"] = []
      repr_dict["num_train"] = self._train.shape[0]
      repr_dict["num_valid"] = (
          self._valid["r"].shape[0] if self._valid is not None else 0
      )
      repr_dict["num_test"] = (
          self._test["r"].shape[0] if self._test is not None else 0
      )
      repr_dict["ent_feat"] = (
          self._ent_feat.shape() if self._ent_feat is not None else -1
      )
      repr_dict["rel_feat"] = (
          self._rel_feat.shape() if self._rel_feat is not None else -1
      )
  
      return json.dumps(repr_dict, ensure_ascii=False)
  
imports: import os
  import json
  from collections import defaultdict
  import numpy
label_desc: Use image node_id 2 for calling the TriGraph obj's underlying member method code with example usage: obj.__repr__() and returns: json