code: def read_directory(dirname, broken_ok=False, tree_callback=None):
      """
      Read all of the trees in all of the files in a directory
      """
      trees = []
      for filename in sorted(os.listdir(dirname)):
          full_name = os.path.join(dirname, filename)
          trees.extend(
              read_tree_file(full_name, broken_ok, tree_callback)
          )
      return trees
  
imports: from collections import deque
  import logging
  import os
  import re
  from stanza.models.constituency.parse_tree import Tree
  from stanza.utils.get_tqdm import get_tqdm
label_desc: Use image node_id 6 for calling a global function with example usage: read_directory(dirname, broken_ok, tree_callback) and returns: trees