code: def test_complicated():
      """
      A more complicated tree that should successfully read
      """
      text = "( (SBARQ (WHNP (WP Who)) (SQ (VP (VBZ sits) (PP (IN in) (NP (DT this) (NN seat))))) (. ?)))"
      trees = tree_reader.read_trees(text)
      assert len(trees) == 1
      tree = trees[0]
      assert not tree.is_leaf()
      assert not tree.is_preterminal()
      assert tree.label == "ROOT"
      assert len(tree.children) == 1
      assert tree.children[0].label == "SBARQ"
      assert len(tree.children[0].children) == 3
      assert [x.label for x in tree.children[0].children] == [
          "WHNP",
          "SQ",
          ".",
      ]
  
file_path: stanza/stanza/tests/constituency/test_tree_reader.py
imports: import pytest
  from stanza.models.constituency import tree_reader
  from stanza.models.constituency.tree_reader import MixedTreeError, UnclosedTreeError, UnlabeledTreeError
  from stanza.tests import *
label_desc: Use image node_id 4 for calling a global function with example usage: test_complicated() without return types