code: def get_parser():
      """Get argument parser."""
      parser = argparse.ArgumentParser(
          description=(
              "Utilities to format from MFA to ESPnet.\n"
              "Usage: python scripts/utils/mfa_format.py TASK [--options]\n"
              "python scripts/utils/mfa_format.py labs\n"
              "python scripts/utils/mfa_format.py validate\n"
              "python scripts/utils/mfa_format.py durations\n"
          )
      )
  
      parser.add_argument(
          "task",
          choices=["labs", "validate", "durations", "dictionary"],
          help='Must be "labs, "validate" or "durations',
      )
      parser.add_argument(
          "--data_sets",
          help="""List of the data sets (train, dev, eval)
          employed for generating the wavs/labs.""",
      )
      parser.add_argument(
          "--corpus_dir",
          type=str,
          help="Path to save the corpus in wav/lab format",
      )
      parser.add_argument(
          "--samplerate",
          type=int,
          default=22050,
          help="Sampling rate of the audio files",
      )
      parser.add_argument(
          "--g2p_model",
          type=str,
          help="Name of the grapheme-to-phoneme model from ESPnet.",
      )
      parser.add_argument(
          "--text_cleaner",
          type=str,
          default=None,
          help="Name of the text cleaner from ESPnet.",
      )
      parser.add_argument(
          "--hop_size",
          type=int,
          default=256,
          help="The number of shift points.",
      )
      parser.add_argument(
          "--textgrid_dir",
          type=str,
          default=TEXTGRID_DIR,
          help="Path to output MFA .TextGrid files",
      )
      parser.add_argument(
          "--train_text_path",
          type=str,
          default=TRAIN_TEXT_PATH,
          help="Path to output list of utterances to phonemes",
      )
      parser.add_argument(
          "--durations_path",
          type=str,
          default=DURATIONS_PATH,
          help="Path to output durations file",
      )
      parser.add_argument(
          "--dictionary_path",
          type=str,
          default=DICTIONARY_PATH,
          help="Path to output dictionary file",
      )
      return parser
  
imports: import argparse
  import codecs
  import json
  import logging
  import os
  import re
  import sys
  import traceback
  from pathlib import Path
  from typing import Dict
  import kaldiio
  import soundfile
  from pyopenjtalk import run_frontend
  from espnet2.text.phoneme_tokenizer import PhonemeTokenizer
label_desc: Use image node_id 3 for calling a global function with example usage: get_parser() and returns: parser