class_docstr: Rational field based on GMPY's ``mpq`` type.
  
  This will be the implementation of :ref:`QQ` if ``gmpy`` or ``gmpy2`` is
  installed. Elements will be of type ``gmpy.mpq``.
docstr: Returns factorial of ``a``. 
docstr_tok: ["Returns","factorial","of","``","a","``","."]
code: def factorial(self, a):
      """Returns factorial of ``a``."""
      return GMPYRational(gmpy_factorial(int(a)))
  
imports: from sympy.polys.domains.groundtypes import GMPYRational, SymPyRational, gmpy_numer, gmpy_denom, factorial
  from sympy.polys.domains.rationalfield import RationalField
  from sympy.polys.polyerrors import CoercionFailed
  from sympy.utilities import public
label_desc: Use image node_id 17 for calling the GMPYRationalField obj's underlying member method code with example usage: obj.factorial(a) and returns: GMPYRational