code: def filteritems(predicate, dict_):
      
      predicate = all if predicate is None else ensure_callable(predicate)
      ensure_mapping(dict_)
      return dict_.__class__(ifilter(predicate, iteritems(dict_)))
docs: Return a new dictionary comprising of items
      for which ``predicate`` returns True.
  
      :param predicate: Predicate taking a key-value pair, or None
  
      .. versionchanged: 0.0.2
         ``predicate`` is now taking a key-value pair as a single argument.