code: def _cat_results(out_file, tmp_dir):
      file_name_pattern = re.compile(r"/rank([1-9][0-9]*)|0$")
      with out_file.open("w") as out_f:
          for f in sorted(tmp_dir.iterdir()):
              if not f.is_file():
                  warnings.warn(f"Unexpected not file {f}")
              elif not file_name_pattern.search(str(f)):
                  warnings.warn(f"Unexpected file {f}")
              else:
                  with f.open("r") as in_f:
                      for l in in_f:
                          out_f.write(l)
  
file_path: NeMo/scripts/neural_machine_translation/length_ratio_filter.py
imports: import argparse
  import logging
  import multiprocessing
  import re
  import shutil
  import warnings
  from pathlib import Path
  from time import sleep
  from tqdm import tqdm
label_desc: Use image node_id 6 for calling a global function with example usage: _cat_results(out_file, tmp_dir) without return types