code: def get_parser():
      parser = config_argparse.ArgumentParser(
          description="Frontend inference",
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
      )
  
      # Note(kamo): Use '_' instead of '-' as separator.
      # '-' is confusing if written in yaml.
  
      parser.add_argument(
          "--log_level",
          type=lambda x: x.upper(),
          default="INFO",
          choices=(
              "CRITICAL",
              "ERROR",
              "WARNING",
              "INFO",
              "DEBUG",
              "NOTSET",
          ),
          help="The verbose level of logging",
      )
  
      parser.add_argument("--output_dir", type=str, required=True)
  
      parser.add_argument(
          "--dtype",
          default="float32",
          choices=["float16", "float32", "float64"],
          help="Data type",
      )
  
      group = parser.add_argument_group("Input data related")
      group.add_argument(
          "--ref_scp",
          type=str,
          required=True,
          action="append",
      )
      group.add_argument(
          "--inf_scp",
          type=str,
          required=True,
          action="append",
      )
      group.add_argument("--key_file", type=str)
      group.add_argument("--metrics", type=str, action="append")
      group.add_argument("--ref_channel", type=int, default=0)
      group.add_argument(
          "--frame_size",
          type=int,
          default=512,
          help="STFT frame size in samples, for calculating framewise-* metrics",
      )
      group.add_argument(
          "--frame_hop",
          type=int,
          default=256,
          help="STFT frame hop in samples, for calculating framewise-* metrics",
      )
  
      return parser
  
file_path: espnet/egs2/jdcinal/asr1/pyscripts/utils/calculate_speech_metrics.py
imports: import argparse
  import logging
  import sys
  from typing import List, Union
  import numpy
  import torch
  from mir_eval.separation import bss_eval_sources
  from pystoi import stoi
  from typeguard import check_argument_types
  from espnet2.enh.encoder.stft_encoder import STFTEncoder
  from espnet2.enh.espnet_model import ESPnetEnhancementModel
  from espnet2.fileio.datadir_writer import DatadirWriter
  from espnet2.fileio.sound_scp import SoundScpReader
  from espnet2.utils import config_argparse
  from espnet.utils.cli_utils import get_commandline_args
label_desc: Use image node_id 2 for calling a global function with example usage: get_parser() and returns: parser