def nicer_get(di, required, *path):
    """
    this is a nicer way of doing dict.get()

    :param di: dict
    :param required: bool, raises an exc if value is not found, otherwise returns None
    :param path: list of str to navigate in the dict
    :return: your value
    """

    r = di
    for p in path:
        try:
            r = r[p]
        except KeyError:
            if required:
                logger.error("can't locate %s in ruleset dict, keys present: %s",
                             p, list(r.keys()))
                logger.debug("full dict = %s", r)
                raise ColinRulesetException("Validation error: can't locate %s in ruleset." % p)
            return
    return r