code: def grampoint(ctx, n):
      # asymptotic expansion, from
      # http://mathworld.wolfram.com/GramPoint.html
      g = (
          2
          * ctx.pi
          * ctx.exp(1 + ctx.lambertw((8 * n + 1) / (8 * ctx.e)))
      )
      return ctx.findroot(lambda t: ctx.siegeltheta(t) - ctx.pi * n, g)
  
imports: from __future__ import print_function
  from ..libmp.backend import xrange
  from .functions import defun, defun_wrapped, defun_static
label_desc: Use image node_id 3 for calling a global function with example usage: grampoint(ctx, n) and returns: ctx