code: def test_compound_constituents():
      # TODO: add skinny trees like this to the various transition tests
      text = "((VP (VB Unban)))"
      trees = tree_reader.read_trees(text)
      assert Tree.get_compound_constituents(trees) == [("ROOT", "VP")]
  
      text = "(ROOT (SBARQ (WHNP (WP Who)) (SQ (VP (VBZ sits) (PP (IN in)))) (. ?)))"
      trees = tree_reader.read_trees(text)
      assert Tree.get_compound_constituents(trees) == [
          ("PP",),
          ("ROOT", "SBARQ"),
          ("SQ", "VP"),
          ("WHNP",),
      ]
  
      text = "((VP (VB Unban)))   (ROOT (SBARQ (WHNP (WP Who)) (SQ (VP (VBZ sits) (PP (IN in)))) (. ?)))"
      trees = tree_reader.read_trees(text)
      assert Tree.get_compound_constituents(trees) == [
          ("PP",),
          ("ROOT", "SBARQ"),
          ("ROOT", "VP"),
          ("SQ", "VP"),
          ("WHNP",),
      ]
  
imports: import pytest
  from stanza.models.constituency.parse_tree import Tree
  from stanza.models.constituency import tree_reader
  from stanza.tests import *
label_desc: Use image node_id 15 for calling a global function with example usage: test_compound_constituents() without return types