code: def test_extgcd():
      iteration = 300
      max_value = 100
  
      for _ in range(iteration):
          a = random.randint(1, max_value)
          b = random.randint(1, max_value)
          g, x = _index_arith._extgcd(a, b)
          assert g == math.gcd(a, b)
          assert (g - a * x) % b == 0
  
imports: import random
  import math
  from cupyx.distributed.array import _index_arith
label_desc: Use image node_id 1 for calling a global function with example usage: test_extgcd() without return types