class_docstr: A utility class for manipulating the UMLS Semantic Type Hierarchy.
  Designed to be constructed from a TSV file using `construct_umls_tree_from_tsv`.
class_docstr_tok: ["A","utility","class","for","manipulating","the","UMLS","Semantic","Type","Hierarchy",".","Designed","to","be","constructed","from","a","TSV","file","using","`","construct_umls_tree_from_tsv","`","."]
code: def __init__(self, root: SemanticTypeNode) -> None:
      children = self.get_children(root)
      children.append(root)
      # We'll store the nodes as a flattened list too, because
      # we don't just care about the leaves of the tree - sometimes
      # we'll need efficient access to intermediate nodes, and the tree
      # is tiny anyway.
      self.flat_nodes: List[SemanticTypeNode] = children
      self.type_id_to_node = {
          node.type_id: node for node in self.flat_nodes
      }
      self.depth = max([node.level for node in self.flat_nodes])
  
file_path: scispacy/scispacy/umls_semantic_type_tree.py
imports: from typing import NamedTuple, List, Dict, Deque, Any, Optional
  from collections import deque
  from scispacy.file_cache import cached_path
label_desc: Use image node_id 1 to create a new UmlsSemanticTypeTree object  with example: obj = UmlsSemanticTypeTree(root)