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","`","."]
docstr: Returns the parent of the input node, returning None if the input node is the root of the tree
docstr_tok: ["Returns","the","parent","of","the","input","node",",","returning","None","if","the","input","node","is","the","root","of","the","tree"]
code: def get_parent(
      self, node: SemanticTypeNode
  ) -> Optional[SemanticTypeNode]:
      """
      Returns the parent of the input node, returning None if the input node is the root of the tree
      """
      current_depth = node.level
      possible_parents = self.get_nodes_at_depth(current_depth - 1)
  
      for possible_parent in possible_parents:
          for child in possible_parent.children:
              if child.type_id == node.type_id:
                  return possible_parent
  
      # If there are no parents, we are at the root and return None
      return None
  
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 6 for calling the UmlsSemanticTypeTree obj's underlying member method code with example usage: obj.get_parent(node) and returns: None, possible_parent