code: def get_parser():
      parser = argparse.ArgumentParser(
          description="Prepare segments from text files in yaml format",
          formatter_class=argparse.ArgumentDefaultsHelpFormatter,
      )
      parser.add_argument(
          "input_dir", type=str, help="path to J-KAC corpus"
      )
      parser.add_argument(
          "wav_scp_path", type=str, help="path to output 'wav.scp' file"
      )
      parser.add_argument(
          "utt2spk_path", type=str, help="path to output 'utt2spk' file"
      )
      parser.add_argument(
          "text_path", type=str, help="path to output 'text' file"
      )
      parser.add_argument(
          "segments_path",
          type=str,
          help="path to output 'segments' file",
      )
      parser.add_argument("sample_rate", type=str, help="sampling rate")
      return parser
  
imports: import argparse
  import os
  import re
  import sys
  from collections import namedtuple
  import yaml
label_desc: Use image node_id 1 for calling a global function with example usage: get_parser() and returns: parser