class_docstr: Class representing a monomial, i.e. a product of powers. 
class_docstr_tok: ["Class","representing","a","monomial",",","i.e",".","a","product","of","powers","."]
docstr: Least common multiple of monomials. 
docstr_tok: ["Least","common","multiple","of","monomials","."]
code: def lcm(self, other):
      """Least common multiple of monomials."""
      if isinstance(other, Monomial):
          exponents = other.exponents
      elif isinstance(other, (tuple, Tuple)):
          exponents = other
      else:
          raise TypeError(
              "an instance of Monomial class expected, got %s" % other
          )
  
      return self.rebuild(monomial_lcm(self.exponents, exponents))
  
imports: from itertools import combinations_with_replacement, product
  from textwrap import dedent
  from sympy.core import Mul, S, Tuple, sympify
  from sympy.polys.polyerrors import ExactQuotientFailed
  from sympy.polys.polyutils import PicklableWithSlots, dict_from_expr
  from sympy.utilities import public
  from sympy.utilities.iterables import is_sequence, iterable
label_desc: Use image node_id 15 for calling the Monomial obj's underlying member method code with example usage: obj.lcm(other) and returns: self