code: def _prime_decomp_maximal_ideal(I, p, ZK):
      r"""
      We have reached the case where we have a maximal (hence prime) ideal *I*,
      which we know because the quotient ``O/I`` is a field.
  
      Parameters
      ==========
  
      I : :py:class:`~.Module`
          An ideal of ``O/pO``.
      p : int
          The rational prime being factored.
      ZK : :py:class:`~.Submodule`
          The maximal order.
  
      Returns
      =======
  
      :py:class:`~.PrimeIdeal` instance representing this prime
  
      """
      m, n = I.matrix.shape
      f = m - n
      G = ZK.matrix * I.matrix
      gens = [
          ZK.parent(G[:, j], denom=ZK.denom) for j in range(G.shape[1])
      ]
      alpha = _two_elt_rep(gens, ZK, p, f=f)
      return PrimeIdeal(ZK, p, alpha, f)
  
imports: from sympy.polys.polytools import Poly
  from sympy.polys.domains.finitefield import FF
  from sympy.polys.domains.rationalfield import QQ
  from sympy.polys.domains.integerring import ZZ
  from sympy.polys.matrices.domainmatrix import DomainMatrix
  from sympy.polys.polyerrors import CoercionFailed
  from sympy.polys.polyutils import IntegerPowerable
  from sympy.utilities.decorator import public
  from .basis import round_two, nilradical_mod_p
  from .exceptions import StructureError
  from .modules import ModuleEndomorphism, find_min_poly
  from .utilities import coeff_search, supplement_a_subspace
label_desc: Use image node_id 7 for calling a global function with example usage: _prime_decomp_maximal_ideal(I, p, ZK) and returns: PrimeIdeal