code: def test_tree_can_collapse_nodes(self):
      new_mapping = self.tree.get_collapsed_type_id_map_at_level(2)
      assert new_mapping == {
          "T052": "T052",
          "T053": "T052",
          "T054": "T052",
          "T055": "T052",
          "T056": "T052",
          "T051": "T051",
      }
      assert ["T052"] == [
          node.type_id for node in self.tree.get_nodes_at_depth(2)
      ]
  
file_path: scispacy/tests/test_umls_semantic_type_tree.py
imports: import unittest
  from scispacy.umls_semantic_type_tree import construct_umls_tree_from_tsv
label_desc: Use image node_id 3 for calling the TestUmlsSemanticTypeTree obj's underlying member method code with example usage: obj.test_tree_can_collapse_nodes() without return types