code: def build_sequence(
      tree, transition_scheme=TransitionScheme.TOP_DOWN_UNARY
  ):
      """
      Turn a single tree into a list of transitions based on the TransitionScheme
      """
      if transition_scheme is TransitionScheme.IN_ORDER:
          return list(yield_in_order_sequence(tree))
      elif (
          transition_scheme is TransitionScheme.IN_ORDER_COMPOUND
          or transition_scheme is TransitionScheme.IN_ORDER_UNARY
      ):
          return list(
              yield_in_order_compound_sequence(tree, transition_scheme)
          )
      else:
          return list(yield_top_down_sequence(tree, transition_scheme))
  
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 4 for calling a global function with example usage: build_sequence(tree, transition_scheme) and returns: list, list, list