code: def _polyexp(ctx, n, x, extra=False):
      def _terms():
          if extra:
              yield ctx.sincpi(n)
          t = x
          k = 1
          while 1:
              yield k**n * t
              k += 1
              t = t * x / k
  
      return ctx.sum_accurately(_terms, check_step=4)
  
imports: from ..libmp.backend import xrange
  import math
  import cmath
label_desc: Use image node_id 43 for calling a global function with example usage: _polyexp(ctx, n, x, extra) and returns: ctx