code: def convert_trees_to_sequences(
      trees, treebank_name, transition_scheme, reverse=False
  ):
      """
      Wrap both build_treebank and all_transitions, possibly with a tqdm
  
      Converts trees to a list of sequences, then returns the list of known transitions
      """
      logger.info(
          "Building {} transition sequences".format(treebank_name)
      )
      if logger.getEffectiveLevel() <= logging.INFO:
          trees = tqdm(trees)
      sequences = build_treebank(trees, transition_scheme, reverse)
      transitions = all_transitions(sequences)
      return sequences, transitions
  
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 7 for calling a global function with example usage: convert_trees_to_sequences(trees, treebank_name, transition_scheme, reverse) and returns: sequences,  transitions