def _check_conf(cfg, req_keys, cat=""):
    """Generic checking for required keys.

    """
    for k in req_keys:
        try:
            cfg[k]
        except __HOLE__:
            raise KeyError(("Required key is missing in the "
                            "{} configuration file: {}").format(cat, k))
dataset/ETHPy150Open BenoitDamota/mempamal/mempamal/configuration.py/_check_conf