code: def _rootof1(ctx, k, n):
      k = int(k)
      n = int(n)
      k %= n
      if not k:
          return ctx.one
      elif 2 * k == n:
          return -ctx.one
      elif 4 * k == n:
          return ctx.j
      elif 4 * k == 3 * n:
          return -ctx.j
      return ctx.expjpi(2 * ctx.mpf(k) / n)
  
imports: from ..libmp.backend import xrange
  import math
  import cmath
label_desc: Use image node_id 23 for calling a global function with example usage: _rootof1(ctx, k, n) and returns: ctx, ctx, unknown, ctx, unknown