def dict_depth(dictionary):
    """Get depth of nested dict
    """
    if isinstance(dictionary, dict):
        return 1 + (max(map(dict_depth, dictionary.values())) if dictionary else 0)

    return 0