code: def jacobi(x, y):
      """Jacobi symbol (x / y)."""
      if y <= 0 or not y % 2:
          raise ValueError("y should be an odd positive integer")
      x %= y
      if not x:
          return int(y == 1)
      if y == 1 or x == 1:
          return 1
      if gcd(x, y) != 1:
          return 0
      j = 1
      while x != 0:
          while x % 2 == 0 and x > 0:
              x >>= 1
              if y % 8 in [3, 5]:
                  j = -j
          x, y = y, x
          if x % 4 == y % 4 == 3:
              j = -j
          x %= y
      return j
  
imports: import sys
  import math
  import mpmath.libmp
label_desc: Use image node_id 12 for calling a global function with example usage: jacobi(x, y) and returns: j, int, int, int