def _in_process_find_conf_file(conf_src_dir, conf_file_name, use_sample=True):
    dflt_src_dir = os.path.normpath(os.path.join(os.path.abspath(__file__),
                                    os.pardir, os.pardir, os.pardir,
                                    'etc'))
    conf_src_dir = dflt_src_dir if conf_src_dir is None else conf_src_dir
    conf_file_path = os.path.join(conf_src_dir, conf_file_name)
    if os.path.exists(conf_file_path):
        return conf_file_path

    if use_sample:
        # fall back to using the corresponding sample conf file
        conf_file_name += '-sample'
        conf_file_path = os.path.join(dflt_src_dir, conf_file_name)
        if os.path.exists(conf_file_path):
            return conf_file_path

    msg = 'Failed to find config file %s' % conf_file_name
    raise InProcessException(msg)
Parse the command-line arguments into a dict.
dataset/ETHPy150Open openstack/swift/test/functional/__init__.py/_in_process_find_conf_file--crossover with--dataset/ETHPy150Open NYTimes/ingredient-phrase-tagger/lib/training/cli.py/Cli._parse_args