class_docstr: Class for representing ImageNet/WordNet hierarchy. 
class_docstr_tok: ["Class","for","representing","ImageNet\/WordNet","hierarchy","."]
docstr: Check if a node is an ancestor of another.
  
  Args:
      ancestor_wnid (str) : WordNet ID for synset represented by ancestor node
      child_wnid (str) : WordNet ID for synset represented by child node
  
  Returns:
      A boolean variable indicating whether or not the node is an ancestor
docstr_tok: ["Check","if","a","node","is","an","ancestor","of","another",".","Args",":","ancestor_wnid","(","str",")",":","WordNet","ID","for","synset","represented","by","ancestor","node","child_wnid","(","str",")",":","WordNet","ID","for","synset","represented","by","child","node","Returns",":","A","boolean","variable","indicating","whether","or","not","the","node","is","an","ancestor"]
code: def is_ancestor(self, ancestor_wnid, child_wnid):
      """
      Check if a node is an ancestor of another.
  
      Args:
          ancestor_wnid (str) : WordNet ID for synset represented by ancestor node
          child_wnid (str) : WordNet ID for synset represented by child node
  
      Returns:
          A boolean variable indicating whether or not the node is an ancestor
      """
      return child_wnid in self.tree[ancestor_wnid].descendants_all
  
file_path: robustness/robustness/tools/imagenet_helpers.py
imports: import os
  import numpy
  import json
  from itertools import product
label_desc: Use image node_id 4 for calling the ImageNetHierarchy obj's underlying member method code with example usage: obj.is_ancestor(ancestor_wnid, child_wnid) and returns: unknown