code: def get_metrics(manifest, manifest_out):
      """Calculate metrics for sample in manifest and saves the results to manifest_out"""
      with open(manifest, "r") as f:
          lines = f.readlines()
  
      lines = Parallel(n_jobs=args.num_jobs)(
          delayed(_calculate)(json.loads(line), edge_len=args.edge_len)
          for line in tqdm(lines)
      )
      with open(manifest_out, "w") as f_out:
          for line in lines:
              f_out.write(json.dumps(line) + "\n")
      logging.info(f"Metrics save at {manifest_out}")
  
file_path: NeMo/tools/ctc_segmentation/scripts/get_metrics_and_filter.py
imports: import argparse
  import json
  import os
  from glob import glob
  import editdistance
  from joblib import Parallel, delayed
  from tqdm import tqdm
  from nemo.collections.asr.parts.preprocessing.segment import AudioSegment
  from nemo.utils import logging
label_desc: Use image node_id 2 for calling a global function with example usage: get_metrics(manifest, manifest_out) without return types