code: def powmod(a, b, c):
      
      if a == 1:
          return 1
      if not HAVE_GMP or max(a, b, c) < _USE_MOD_FROM_GMP_SIZE:
          return pow(a, b, c)
      else:
          return int(gmpy2.powmod(a, b, c))
docs: Uses GMP, if available, to do a^b mod c where a, b, c
      are integers.
  
      :return int: (a ** b) % c