code: def main():
      parser = get_parser()
      args = 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 args.preprocess_conf is not None:
          preprocessing = Transformation(args.preprocess_conf)
          logging.info("Apply preprocessing: {}".format(preprocessing))
      else:
          preprocessing = None
  
      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
  
              if preprocessing is not None:
                  mat = preprocessing(mat, uttid_list=utt)
  
              # shape = (Time, Channel)
              if args.out_filetype in ["sound.hdf5", "sound"]:
                  # Write Tuple[int, numpy.ndarray] (scipy style)
                  writer[utt] = (rate, mat)
              else:
                  writer[utt] = mat
  
file_path: espnet/utils/copy-feats.py
imports: import argparse
  import logging
  from distutils.util import strtobool
  from espnet.transform.transformation import Transformation
  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