class_docstr: This class extract relations, objects or triplets from Wikidata HDT file.
class_docstr_tok: ["This","class","extract","relations",",","objects","or","triplets","from","Wikidata","HDT","file","."]
code: def find_triplets(
      self, subj: str, direction: str
  ) -> Tuple[str, List[List[str]]]:
      subj = subj.split("/")[-1]
      if subj in self.parsed_document:
          triplets = self.parsed_document.get(subj, {}).get(
              direction, []
          )
      else:
          triplets = self.document.get(subj, {}).get(direction, [])
          triplets = self.uncompress(triplets)
      return subj, triplets
  
imports: import datetime
  import re
  from collections import namedtuple
  from logging import getLogger
  from typing import List, Tuple, Dict, Any, Union
  from hdt import HDTDocument
  from deeppavlov.core.commands.utils import expand_path
  from deeppavlov.core.common.file import load_pickle, read_json
  from deeppavlov.core.common.registry import register
label_desc: Use image node_id 19 for calling the WikiParser obj's underlying member method code with example usage: obj.find_triplets(subj, direction) and returns: subj,  triplets