code: def clean_dict(d, test=lambda v: v):
      
      return {k: v for k, v in d.items() if test(v)}
docs: Return only keys that meet the test
      :param d: Dictionary
      :param test: the test to run on the value (example override is: "lambda v: v is not None")
      :return: Cleaned dictionary