#NEWLINE# def lcm( self , a , b ) : #NEWLINE# #INDENT# '\n        Returns LCM of ``a`` and ``b``.\n\n        >>> from sympy.polys.domains import QQ\n        >>> from sympy import S, lcm\n\n        >>> QQ.lcm(QQ(2, 3), QQ(4, 9))\n        4/3\n        >>> lcm(S(2)/3, S(4)/9)\n        4/3\n\n        ' #NEWLINE# try : #NEWLINE# #INDENT# ring = self . get_ring ( ) #NEWLINE# #UNINDENT# except DomainError : #NEWLINE# #INDENT# return ( a * a ) #NEWLINE# #UNINDENT# p = ring . lcm ( self . numer ( a ) , self . numer ( b ) ) #NEWLINE# q = ring . gcd ( self . denom ( a ) , self . denom ( b ) ) #NEWLINE# return ( self . convert ( p , ring ) / q )