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("--ref_channel", type=int, default=0)
      group.add_argument(
          "--flexible_numspk", type=str2bool, default=False
      )
      group.add_argument("--is_tse", type=str2bool, default=False)
  
      group = parser.add_argument_group("DNSMOS related")
      group.add_argument("--use_dnsmos", type=str2bool, default=False)
      group.add_argument(
          "--dnsmos_mode",
          type=str,
          choices=("local", "web"),
          default="local",
          help="Use local DNSMOS model or web API for DNSMOS calculation",
      )
      group.add_argument(
          "--dnsmos_auth_key",
          type=str,
          default="",
          help="Required if dnsmsos_mode='web'",
      )
      group.add_argument(
          "--dnsmos_use_gpu",
          type=str2bool,
          default=False,
          help="used when dnsmsos_mode='local'",
      )
      group.add_argument(
          "--dnsmos_convert_to_torch",
          type=str2bool,
          default=False,
          help="used when dnsmsos_mode='local'",
      )
      group.add_argument(
          "--dnsmos_primary_model",
          type=str,
          default="./DNSMOS/sig_bak_ovr.onnx",
          help="Path to the primary DNSMOS model. Required if dnsmsos_mode='local'",
      )
      group.add_argument(
          "--dnsmos_p808_model",
          type=str,
          default="./DNSMOS/model_v8.onnx",
          help="Path to the p808 model. Required if dnsmsos_mode='local'",
      )
  
      group = parser.add_argument_group("PESQ related")
      group.add_argument(
          "--use_pesq",
          type=str2bool,
          default=False,
          help="Bebore setting this to True, please make sure that you or "
          "your institution have the license "
          "(check https://www.itu.int/rec/T-REC-P.862-200511-I!Amd2/en) to report PESQ",
      )
      return parser
  
imports: import argparse
  import logging
  import re
  import sys
  from pathlib import Path
  from typing import Dict, 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.loss.criterions.time_domain import SISNRLoss
  from espnet2.fileio.datadir_writer import DatadirWriter
  from espnet2.fileio.sound_scp import SoundScpReader
  from espnet2.train.dataset import kaldi_loader
  from espnet2.utils import config_argparse
  from espnet2.utils.types import str2bool
  from espnet.utils.cli_utils import get_commandline_args
label_desc: Use image node_id 4 for calling a global function with example usage: get_parser() and returns: parser