code: def check_reproduce_tree(transition_scheme):
      text = "((SBARQ (WHNP (WP Who)) (SQ (VP (VBZ sits) (PP (IN in) (NP (DT this) (NN seat))))) (. ?)))"
      trees = tree_reader.read_trees(text)
  
      model = SimpleModel(transition_scheme)
      transitions = transition_sequence.build_sequence(
          trees[0], transition_scheme
      )
      states = model.initial_state_from_gold_trees(trees)
      assert (len(states)) == 1
      state = states[0]
      assert state.num_transitions() == 0
  
      for t in transitions:
          assert t.is_legal(state, model)
          state = t.apply(state, model)
  
      # one item for the final tree
      # one item for the sentinel at the end
      assert len(state.constituents) == 2
      # the transition sequence should put all of the words
      # from the buffer onto the tree
      # one spot left for the sentinel value
      assert len(state.word_queue) == 8
      assert state.sentence_length == 6
      assert state.word_position == state.sentence_length
      assert len(state.transitions) == len(transitions) + 1
  
      result_tree = state.constituents.value
      assert result_tree == trees[0]
  
imports: import pytest
  from stanza.models.constituency import parse_transitions
  from stanza.models.constituency import transition_sequence
  from stanza.models.constituency import tree_reader
  from stanza.models.constituency.base_model import SimpleModel, UNARY_LIMIT
  from stanza.models.constituency.parse_transitions import *
  from stanza.tests import *
  from stanza.tests.constituency.test_parse_tree import CHINESE_LONG_LIST_TREE
label_desc: Use image node_id 2 for calling a global function with example usage: check_reproduce_tree(transition_scheme) without return types