code: def split_trn_by_rule(root, name, rule_fn, trn_path):
      lines = read_lines(trn_path)
  
      categorizer.set_category_func(
          lambda line: rule_fn(get_info_from_trn_line(line)[0])
      )
      set2lines = categorizer.exec(lines)
      for k, v in set2lines.items():
          write_lines(
              v, f"{root}/{name}/{k}/{os.path.basename(trn_path)}"
          )
  
imports: import argparse
  import glob
  import json
  import os
  import re
  from typing import Callable, List
  from linguistic_tree import LanguageTree
  from espnet2.utils.types import str2bool
label_desc: Use image node_id 10 for calling a global function with example usage: split_trn_by_rule(root, name, rule_fn, trn_path) without return types