<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filter_dict(d, cb):
 """ Filter a dictionary based on passed function. :param d: The dictionary to be filtered :param cb: A function which is called back for each k, v pair of the dictionary. Should return Truthy or Falsey :return: The filtered dictionary (new instance) """


    return {k: v for k, v in d.items() if cb(k, v)}