class_docstr: Represents a ring domain. 
class_docstr_tok: ["Represents","a","ring","domain","."]
docstr: Returns ``a**(-1)`` if possible. 
docstr_tok: ["Returns","``","a","*","*","(","-1",")","``","if","possible","."]
code: def revert(self, a):
      """Returns ``a**(-1)`` if possible."""
      if self.is_one(a) or self.is_one(-a):
          return a
      else:
          raise NotReversible("only units are reversible in a ring")
  
file_path: sympy/sympy/polys/domains/ring.py
imports: from sympy.polys.domains.domain import Domain
  from sympy.polys.polyerrors import ExactQuotientFailed, NotInvertible, NotReversible
  from sympy.utilities import public
label_desc: Use image node_id 7 for calling the Ring obj's underlying member method code with example usage: obj.revert(a) and returns: a