def int_to_base(n, base):
is_negative = False<EOL>if n == <NUM_LIT:0>:<EOL><INDENT>return '<STR_LIT:0>'<EOL><DEDENT>elif n < <NUM_LIT:0>:<EOL><INDENT>is_negative = True<EOL>n *= -<NUM_LIT:1><EOL><DEDENT>digit = string.digits + string.ascii_uppercase<EOL>res = '<STR_LIT>'<EOL>while n > <NUM_LIT:0>:<EOL><INDENT>res += digit[n % base]<EOL>n //= base<EOL><DEDENT>if is_negative:<EOL><INDENT>return '<STR_LIT:->' + res[::-<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>return res[::-<NUM_LIT:1>]<EOL><DEDENT>
:type n: int
:type base: int
:rtype: str