code: def test_gcdext():
      assert gcdext(0, 0) == (0, 0, 0)
      assert gcdext(3, 0) == (3, 1, 0)
      assert gcdext(0, 4) == (4, 0, 1)
  
      for n in range(1, 10):
          assert gcdext(n, 1) == gcdext(-n, 1) == (1, 0, 1)
          assert gcdext(n, -1) == gcdext(-n, -1) == (1, 0, -1)
          assert gcdext(n, n) == gcdext(-n, n) == (n, 0, 1)
          assert gcdext(n, -n) == gcdext(-n, -n) == (n, 0, -1)
  
      for n in range(2, 10):
          assert gcdext(1, n) == gcdext(1, -n) == (1, 1, 0)
          assert gcdext(-1, n) == gcdext(-1, -n) == (1, -1, 0)
  
      for a, b in permutations([2**5, 3, 5, 7**2, 11], 2):
          g, x, y = gcdext(a, b)
          assert g == a * x + b * y == 1
  
file_path: sympy/sympy/external/tests/test_ntheory.py
imports: from itertools import permutations
  from sympy.external.ntheory import bit_scan1, remove, bit_scan0, is_fermat_prp, is_euler_prp, is_strong_prp, gcdext, _lucas_sequence, is_fibonacci_prp, is_lucas_prp, is_selfridge_prp, is_strong_lucas_prp, is_strong_selfridge_prp, is_bpsw_prp, is_strong_bpsw_prp
  from sympy.testing.pytest import raises
label_desc: Use image node_id 4 for calling a global function with example usage: test_gcdext() without return types