def depth(d, level=1):
    """
    Get the maximum depth of a dictionary.

    Parameters
    ----------
    d : dict
        Dictionary to determine depth
    level : recursive variable
        LEAVE EQUAL TO 1 (recursive function)

    Returns
    -------
    (int) The maximum depth of the dictionary (i.e., the most number of nested dictionaries).
    """
    if not isinstance(d, dict) or not d:
        return level
    return max(depth(d[k], level + 1) for k in d)