def purge_none(d):
    for k in d.keys():
        if d[k] is None:
            del d[k]
    return d
Purge None entries from a dictionary
dataset/ETHPy150Open StackStorm/st2contrib/packs/lastline/actions/lib/analysis_apiclient.py/purge_none