code: def purge_dict(idict):
      
      odict = {}
      for key, val in idict.items():
          if is_null(val):
              continue
          odict[key] = val
      return odict
docs: Remove null items from a dictionary