def merge_config(opts, yaml_name):
    try:
        with open(yaml_name, 'r') as f:
            config = yaml.load(f)
            logger.debug('merging command-line opts with config from file: %s', yaml_name)
            for k, v in config.items():
                if not hasattr(opts,k) or getattr(opts, k) is None:
                    setattr(opts,k,v)
    except __HOLE__:
        logger.error('Could not find config file at %s', yaml_name)
        sys.exit()
dataset/ETHPy150Open embr/gcat/gcat/__init__.py/merge_config