def METHOD_NAME(iargs=None):
    """Command line parser."""
    # parse
    parser = create_parser()
    inps = parser.parse_args(args=iargs)
    # import
    from mintpy.objects import cluster
    # check
    if inps.template_file:
        inps = read_template2inps(inps.template_file, inps)
    # check: --cluster and --num-worker option
    inps.numWorker = str(cluster.DaskCluster.format_num_worker(inps.cluster, inps.numWorker))
    if inps.cluster and inps.numWorker == '1':
        print('WARNING: number of workers is 1, turn OFF parallel processing and continue')
        inps.cluster = None
    # check: --ex option (ignore non-existed exclude_date.txt)
    if inps.excludeDate == 'exclude_date.txt' and not os.path.isfile(inps.excludeDate):
        inps.excludeDate = []
    # check: --poly-order option
    if inps.polyOrder < 1:
        raise argparse.ArgumentTypeError("Minimum polynomial order is 1")
    # check: --output / --dem-error-file option (must be HDF5 file)
    for fname in [inps.ts_cor_file, inps.dem_err_file]:
        if fname:
            fext = os.path.splitext(fname)[1]
            if fext not in ['.h5','.he5']:
                msg = f'--output / --dem-err-file option ({fext}) supports HDF5 file only!'
                raise ValueError(msg)
    # default: --output option
    if not inps.ts_cor_file:
        fbase = os.path.splitext(inps.ts_file)[0]
        inps.ts_cor_file = f'{fbase}_demErr.h5'
    return inps