import six


def remove_nulls_from_dict(d):
    """
    remove_nulls_from_dict function recursively remove empty or null values
    from dictionary and embedded lists of dictionaries
    """
    if isinstance(d, dict):
        return {k: remove_nulls_from_dict(v) for k, v in six.iteritems(d) if v}
    if isinstance(d, list):
        return [remove_nulls_from_dict(entry) for entry in d if entry]
    else:
        return d