def dict_strip_unicode_keys(uni_dict):
 if six.PY3:
  return uni_dict
 return {smart_bytes(key): value for (key, value) in uni_dict.items()}

def dict_strip_unicode_keys ( uni_dict ) : if six . PY3 : return uni_dict return { smart_bytes ( key ) : value for ( key , value ) in uni_dict . items ( ) }
converts a dict of unicode keys into a dict of ascii keys .