code: def split_trees(all_lines, splits):
      """
      Splits lines of the form
      SNT.17873.4049	(S ...
      then assigns them to a list based on the file id in
      SNT.<file>.<sent>
      """
      trees = [list() for _ in splits]
      for line in all_lines:
          tree_id, tree_text = line.split(maxsplit=1)
          tree_id = int(tree_id.split(".", 2)[1])
          for split_idx, split in enumerate(splits):
              if tree_id in split:
                  trees[split_idx].append(tree_text)
                  break
          else:
              # couldn't figure out which split to put this in
              raise ValueError(
                  "Couldn't find which split this line goes in:\n%s"
                  % line
              )
      return trees
  
label_desc: Use image node_id 2 for calling a global function with example usage: split_trees(all_lines, splits) and returns: trees