code: def read_trees(source, max_sents=-1):
      with open(source) as fp:
          trees = []
          while True:
              tree = read_tree(fp)
              if tree is None:
                  break
              trees.append(tree)
              if len(trees) >= max_sents > 0:
                  break
          return trees
  
imports: import logging
  import os
  import pickle
  from collections import Counter
  import numpy
  import torch
  from torch.utils import data
label_desc: Use image node_id 2 for calling a global function with example usage: read_trees(source, max_sents) and returns: trees