code: def yield_in_order_sequence(tree):
      """
      For tree (X A B C D), yield A Open(X) B C D Close
      """
      if tree.is_preterminal():
          yield Shift()
          return
  
      if tree.is_leaf():
          return
  
      for transition in yield_in_order_sequence(tree.children[0]):
          yield transition
  
      yield OpenConstituent(tree.label)
  
      for child in tree.children[1:]:
          for transition in yield_in_order_sequence(child):
              yield transition
  
      yield CloseConstituent()
  
file_path: stanza/stanza/models/constituency/transition_sequence.py
imports: import logging
  from stanza.models.common import utils
  from stanza.models.constituency.parse_transitions import Shift, CompoundUnary, OpenConstituent, CloseConstituent, TransitionScheme, Finalize
  from stanza.models.constituency.tree_reader import read_trees
  from stanza.utils.get_tqdm import get_tqdm
label_desc: Use image node_id 2 for calling a global function with example usage: yield_in_order_sequence(tree) without return types