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