def render_value(value):
if isinstance(value, list):<EOL><INDENT>return '<STR_LIT:[>' + '<STR_LIT:U+002CU+0020>'.join(render_value(v) for v in value) + '<STR_LIT:]>'<EOL><DEDENT>elif isinstance(value, dict):<EOL><INDENT>return (<EOL>'<STR_LIT:{>' +<EOL>'<STR_LIT:U+002CU+0020>'.join('<STR_LIT>'.format(<EOL>k=k, v=render_value(v)) for k, v in sorted(value.items())) +<EOL>'<STR_LIT:}>')<EOL><DEDENT>else:<EOL><INDENT>return repr(value)<EOL><DEDENT>
Render a value, ensuring that any nested dicts are sorted by key.