<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dfilter(fn, record):
 """filter for a directory :param fn: A predicate function :param record: a dict :returns: a dict {'John': 27, 'Graham': 35} """

    return dict([(k, v) for k, v in record.items() if fn(v)])