def mks(val):
if sys.version_info > (<NUM_LIT:3>, <NUM_LIT:0>, <NUM_LIT:0>):<EOL><INDENT>if isinstance(val, bytes):<EOL><INDENT>sval = str(val, '<STR_LIT:utf-8>')<EOL><DEDENT>else:<EOL><INDENT>sval = str(val)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>sval = str(val)<EOL><DEDENT>return sval<EOL>
make sure the value is a string, paying mind to python3 vs 2