def _remove_nulls(data, skip=None):
    """Remove all null/None/empty values from a dict or list, except those listed in skip."""
    if isinstance(data, dict):
        new_dict = {}
        for key, val in data.items():
            new_val = _remove_nulls(val, skip=skip)
            if new_val is not None or (skip is not None and key in skip):
                new_dict[key] = new_val
        return new_dict
    elif isinstance(data, list):
        new_list = []
        for val in data:
            new_val = _remove_nulls(val, skip=skip)
            if new_val is not None:
                new_list.append(new_val)
        return new_list
    # Could delete required but empty blocks - services, etc.
    # elif hasattr(data, "__len__") and len(data) <= 0:
    #    return None
    else:
        return data