code: def test_PrimeIdeal_reduce():
      k = QQ.alg_field_from_poly(Poly(x**3 + x**2 - 2 * x + 8))
      Zk = k.maximal_order()
      P = k.primes_above(2)
      frp = P[2]
  
      # reduce_element
      a = Zk.parent(to_col([23, 20, 11]), denom=6)
      a_bar_expected = Zk.parent(to_col([11, 5, 2]), denom=6)
      a_bar = frp.reduce_element(a)
      assert a_bar == a_bar_expected
  
      # reduce_ANP
      a = k([QQ(11, 6), QQ(20, 6), QQ(23, 6)])
      a_bar_expected = k([QQ(2, 6), QQ(5, 6), QQ(11, 6)])
      a_bar = frp.reduce_ANP(a)
      assert a_bar == a_bar_expected
  
      # reduce_alg_num
      a = k.to_alg_num(a)
      a_bar_expected = k.to_alg_num(a_bar_expected)
      a_bar = frp.reduce_alg_num(a)
      assert a_bar == a_bar_expected
  
imports: from math import prod
  from sympy import QQ, ZZ
  from sympy.abc import x, theta
  from sympy.ntheory import factorint
  from sympy.ntheory.residue_ntheory import n_order
  from sympy.polys import Poly, cyclotomic_poly
  from sympy.polys.matrices import DomainMatrix
  from sympy.polys.numberfields.basis import round_two
  from sympy.polys.numberfields.exceptions import StructureError
  from sympy.polys.numberfields.modules import PowerBasis, to_col
  from sympy.polys.numberfields.primes import prime_decomp, _two_elt_rep, _check_formal_conditions_for_maximal_order
  from sympy.testing.pytest import raises
label_desc: Use image node_id 16 for calling a global function with example usage: test_PrimeIdeal_reduce() without return types