def _l_diversity(x):
    """
        A simple implementation of l-diversity counting na as distinct values

        Aggarwal, Charu C.; Yu, Philip S. (2008):
        "A General Survey of Privacy"
        http://charuaggarwal.net/generalsurvey.pdf
        Springer. ISBN 978-0-387-70991-8
    """
    nb_distinct_without_na = x.nunique(dropna=True)
    nb_of_na = sum(x.isnull())
    return nb_distinct_without_na + nb_of_na
