def depth(data):
    """
    Get the depth of a dictionary
    Args:
        data: data in dictionary type

    Returns: the depth of a dictionary

    """
    if isinstance(data, dict):
        return 1 + (max(map(depth, data.values())) if data else 0)
    return 0