code: def dfilter(fn, record):
      
      return dict([(k, v) for k, v in record.items() if fn(v)])
docs: filter for a directory
  
      :param fn: A predicate function
      :param record: a dict
      :returns: a dict
  
      >>> odd = lambda x: x % 2 != 0
      >>> dfilter(odd, {'Terry': 30, 'Graham': 35, 'John': 27})
      {'John': 27, 'Graham': 35}