def native_stringify_dict(dct_or_tuples, encoding='utf-8', keys_only=True):
 d = {}
 for (k, v) in iteritems(dict(dct_or_tuples)):
  k = _to_native_str(k, encoding)
  if (not keys_only):
   if isinstance(v, dict):
    v = native_stringify_dict(v, encoding=encoding, keys_only=keys_only)
   elif isinstance(v, list):
    v = [_to_native_str(e, encoding) for e in v]
   else:
    v = _to_native_str(v, encoding)
  d[k] = v
 return d

def native_stringify_dict ( dct_or_tuples , encoding = 'utf-8' , keys_only = True ) : d = { } for ( k , v ) in iteritems ( dict ( dct_or_tuples ) ) : k = _to_native_str ( k , encoding ) if ( not keys_only ) : if isinstance ( v , dict ) : v = native_stringify_dict ( v , encoding = encoding , keys_only = keys_only ) elif isinstance ( v , list ) : v = [ _to_native_str ( e , encoding ) for e in v ] else : v = _to_native_str ( v , encoding ) d [ k ] = v return d
return a dict with unicode keys of the given dict converted to strings .