code: def iter_files(
      source_path,
      dest_path,
      tokenizer,
      encoding_level,
      is_aggregate_tokenizer,
      verbose,
  ):
      if isinstance(dest_path, list):
          paths = zip(dest_path, source_path)
      else:  # dest_path is stdin of KenLM
          paths = [(dest_path, path) for path in source_path]
  
      for dest_path, input_path in paths:
          dataset = read_train_file(
              input_path,
              is_aggregate_tokenizer=is_aggregate_tokenizer,
              verbose=verbose,
          )
          if encoding_level == "subword":
              tokenize_text(
                  data=dataset,
                  tokenizer=tokenizer,
                  path=dest_path,
                  chunk_size=CHUNK_SIZE,
                  buffer_size=CHUNK_BUFFER_SIZE,
              )
          else:  # encoding_level == "char"
              if isinstance(dest_path, str):
                  with open(dest_path, "w", encoding="utf-8") as f:
                      for line in dataset:
                          f.write(line[0] + "\n")
              else:  # write to stdin of KenLM
                  for line in dataset:
                      dest_path.write((line[0] + "\n").encode())
  
file_path: NeMo/scripts/asr_language_modeling/ngram_lm/kenlm_utils.py
imports: import gzip
  import json
  import os
  import numpy
  import torch
  from joblib import Parallel, delayed
  from tqdm.auto import tqdm
  import nemo.collections.asr
  from nemo.collections.asr.parts.submodules.ctc_beam_decoding import DEFAULT_TOKEN_OFFSET
  from nemo.utils import logging
label_desc: Use image node_id 4 for calling a global function with example usage: iter_files(source_path, dest_path, tokenizer, encoding_level, is_aggregate_tokenizer, verbose) without return types