code: def test_all_leaves_are_preterminals():
      text = "((S (VP (VB Unban)) (NP (NNP Mox) (NNP Opal))))"
      trees = tree_reader.read_trees(text)
      assert len(trees) == 1
      assert trees[0].all_leaves_are_preterminals()
  
      text = "((S (VP (VB Unban)) (NP (Mox) (NNP Opal))))"
      trees = tree_reader.read_trees(text)
      assert len(trees) == 1
      assert not trees[0].all_leaves_are_preterminals()
  
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 19 for calling a global function with example usage: test_all_leaves_are_preterminals() without return types