code: def get_edges_in_1_file(fn, num_parts):
      num_lines = 0
      edges = [0]
      with open(fn) as f:
          i = 0
          for l in f:
              i += len(l.encode("utf-8"))
              edges.append(i)
              num_lines += 1
      return [
          edges[int(i * num_lines / num_parts)]
          for i in range(num_parts)
      ] + [edges[-1]], num_lines
  
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 2 for calling a global function with example usage: get_edges_in_1_file(fn, num_parts) and returns: unknown,  num_lines