def _filter_dict(input_dict, search_key, search_value):
 output_dict = dict()
 for (key, key_list) in six.iteritems(input_dict):
  key_list_filtered = _filter_list(key_list, search_key, search_value)
  if key_list_filtered:
   output_dict[key] = key_list_filtered
 return output_dict

def _filter_dict ( input_dict , search_key , search_value ) : output_dict = dict ( ) for ( key , key_list ) in six . iteritems ( input_dict ) : key_list_filtered = _filter_list ( key_list , search_key , search_value ) if key_list_filtered : output_dict [ key ] = key_list_filtered return output_dict
filters a dictionary of dictionaries by a key-value pair .