input: Write a python function to find the next prime number after a given number.
  assert next_prime(26) == 29
  assert next_prime(100) == 101
  assert next_prime(29) == 31
output: def next_prime(n):
      def is_prime(k):
          if k < 2:
              return False
          for i in range(2, int(k**0.5) + 1):
              if k % i == 0:
                  return False
          return True
      
      candidate = n + 1
      while True:
          if is_prime(candidate):
              return candidate
          candidate += 1