def inherit_setting(relative, child, key, default):
    """Returns setting only in case it was not inherited from ancestors

    """
    if isinstance(default, list):
        default.append(relative.get(key, default[0]))
    else:
        default = [default, relative.get(key, default)]
    if not child.get(key, default) in default:
        return {key: child.get(key)}
    else:
        return {}
