code: def test_compound_open(model=None):
      if model is None:
          model = SimpleModel()
      state = build_initial_state(model)[0]
  
      open_transition = parse_transitions.OpenConstituent("ROOT", "S")
      assert open_transition.is_legal(state, model)
      shift = parse_transitions.Shift()
      close_transition = parse_transitions.CloseConstituent()
  
      state = open_transition.apply(state, model)
      state = shift.apply(state, model)
      state = shift.apply(state, model)
      state = shift.apply(state, model)
      state = close_transition.apply(state, model)
  
      tree = model.get_top_constituent(state.constituents)
      assert tree.label == "ROOT"
      assert len(tree.children) == 1
      tree = tree.children[0]
      assert tree.label == "S"
      assert len(tree.children) == 3
      assert tree.children[0].children[0].label == "Unban"
      assert tree.children[1].children[0].label == "Mox"
      assert tree.children[2].children[0].label == "Opal"
  
imports: import pytest
  from stanza.models.constituency import parse_transitions
  from stanza.models.constituency.base_model import SimpleModel, UNARY_LIMIT
  from stanza.models.constituency.parse_transitions import TransitionScheme, Shift, CloseConstituent, OpenConstituent
  from stanza.tests import *
label_desc: Use image node_id 8 for calling a global function with example usage: test_compound_open(model) without return types