class_docstr: Integer ring based on GMPY's ``mpz`` type.
  
  This will be the implementation of :ref:`ZZ` if ``gmpy`` or ``gmpy2`` is
  installed. Elements will be of type ``gmpy.mpz``.
class_docstr_tok: ["Integer","ring","based","on","GMPY","'s","``","mpz","``","type",".","This","will","be","the","implementation","of",":","ref",":","`","ZZ","`","if","``","gmpy","``","or","``","gmpy2","``","is","installed",".","Elements","will","be","of","type","``","gmpy.mpz","``","."]
docstr: Convert GMPY ``mpq`` to GMPY's ``mpz``. 
docstr_tok: ["Convert","GMPY","``","mpq","``","to","GMPY","'s","``","mpz","``","."]
code: def from_QQ_gmpy(K1, a, K0):
      """Convert GMPY ``mpq`` to GMPY's ``mpz``."""
      if a.denominator == 1:
          return a.numerator
  
imports: from sympy.polys.domains.groundtypes import GMPYInteger, SymPyInteger, factorial, gmpy_gcdex, gmpy_gcd, gmpy_lcm, sqrt
  from sympy.core.numbers import int_valued
  from sympy.polys.domains.integerring import IntegerRing
  from sympy.polys.polyerrors import CoercionFailed
  from sympy.utilities import public
label_desc: Use image node_id 10 for calling the GMPYIntegerRing obj's underlying member method code with example usage: obj.from_QQ_gmpy(K1, a, K0) and returns: a