code: def main():
      args = get_parser().parse_args()
  
      # logging info
      logfmt = "%(asctime)s (%(module)s:%(lineno)d) %(levelname)s: %(message)s"
      if args.verbose > 0:
          logging.basicConfig(level=logging.INFO, format=logfmt)
      else:
          logging.basicConfig(level=logging.WARN, format=logfmt)
      logging.info(get_commandline_args())
  
      if ":" in args.stats_rspecifier_or_rxfilename:
          is_rspcifier = True
          if args.stats_filetype == "npy":
              stats_filetype = "hdf5"
          else:
              stats_filetype = args.stats_filetype
  
          stats_dict = dict(
              file_reader_helper(
                  args.stats_rspecifier_or_rxfilename, stats_filetype
              )
          )
      else:
          is_rspcifier = False
          if args.stats_filetype == "mat":
              stats = kaldiio.load_mat(
                  args.stats_rspecifier_or_rxfilename
              )
          else:
              stats = numpy.load(args.stats_rspecifier_or_rxfilename)
          stats_dict = {None: stats}
  
      cmvn = CMVN(
          stats=stats_dict,
          norm_means=args.norm_means,
          norm_vars=args.norm_vars,
          utt2spk=args.utt2spk,
          spk2utt=args.spk2utt,
          reverse=args.reverse,
      )
  
      with file_writer_helper(
          args.wspecifier,
          filetype=args.out_filetype,
          write_num_frames=args.write_num_frames,
          compress=args.compress,
          compression_method=args.compression_method,
      ) as writer:
          for utt, mat in file_reader_helper(
              args.rspecifier, args.in_filetype
          ):
              if is_scipy_wav_style(mat):
                  # If data is sound file, then got as Tuple[int, ndarray]
                  rate, mat = mat
              mat = cmvn(mat, utt if is_rspcifier else None)
              writer[utt] = mat
  
file_path: espnet/utils/apply-cmvn.py
imports: import argparse
  import logging
  from distutils.util import strtobool
  import kaldiio
  import numpy
  from espnet.transform.cmvn import CMVN
  from espnet.utils.cli_readers import file_reader_helper
  from espnet.utils.cli_utils import get_commandline_args, is_scipy_wav_style
  from espnet.utils.cli_writers import file_writer_helper
label_desc: Use image node_id 2 for calling a global function with example usage: main() without return types