def _cleanup(lst):
    """
    Return a list of non-empty dictionaries.
    """
    clean = []
    for ele in lst:
        if ele and isinstance(ele, dict):
            clean.append(ele)
    return clean