code: def build_treebank(
      trees,
      transition_scheme=TransitionScheme.TOP_DOWN_UNARY,
      reverse=False,
  ):
      """
      Turn each of the trees in the treebank into a list of transitions based on the TransitionScheme
      """
      if reverse:
          return [
              build_sequence(tree.reverse(), transition_scheme)
              for tree in trees
          ]
      else:
          return [
              build_sequence(tree, transition_scheme) for tree in trees
          ]
  
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 5 for calling a global function with example usage: build_treebank(trees, transition_scheme, reverse) and returns: unknown, unknown