def _unichr(i):
if not isinstance(i, int):<EOL><INDENT>raise TypeError<EOL><DEDENT>try:<EOL><INDENT>return six.unichr(i)<EOL><DEDENT>except ValueError:<EOL><INDENT>return struct.pack("<STR_LIT:i>", i).decode("<STR_LIT>")<EOL><DEDENT>
Helper function for taking a Unicode scalar value and returning a Unicode character.

:param s: Unicode scalar value to convert.
:return: Unicode character