def to_str_coll(dct):
res = dict()<EOL>try:<EOL><INDENT>for key, val in dct.items():<EOL><INDENT>res[str(key)] = to_str_coll(val)<EOL><DEDENT>return res<EOL><DEDENT>except:<EOL><INDENT>try:<EOL><INDENT>return [str(val) for val in dct]<EOL><DEDENT>except:<EOL><INDENT>return str(dct)<EOL><DEDENT><DEDENT>
converts a dictionary to a string dictionary