def keys_to_string(data):
if isinstance(data, dict):<EOL><INDENT>for key in list(data.keys()):<EOL><INDENT>if isinstance(key, six.string_types):<EOL><INDENT>value = data[key]<EOL>val = keys_to_string(value)<EOL>del data[key]<EOL>data[key.encode("<STR_LIT:utf8>", "<STR_LIT:ignore>")] = val<EOL><DEDENT><DEDENT><DEDENT>return data<EOL>
Function to convert all the unicode keys in string keys