class_docstr: A mutable matrix of objects from poly module or to operate with them.
  
  Examples
  ========
  
  >>> from sympy.polys.polymatrix import PolyMatrix
  >>> from sympy import Symbol, Poly
  >>> x = Symbol('x')
  >>> pm1 = PolyMatrix([[Poly(x**2, x), Poly(-x, x)], [Poly(x**3, x), Poly(-1 + x, x)]])
  >>> v1 = PolyMatrix([[1, 0], [-1, 0]], x)
  >>> pm1*v1
  PolyMatrix([
  [    x**2 + x, 0],
  [x**3 - x + 1, 0]], ring=QQ[x])
  
  >>> pm1.ring
  ZZ[x]
  
  >>> v1*pm1
  PolyMatrix([
  [ x**2, -x],
  [-x**2,  x]], ring=QQ[x])
  
  >>> pm2 = PolyMatrix([[Poly(x**2, x, domain='QQ'), Poly(0, x, domain='QQ'), Poly(1, x, domain='QQ'),             Poly(x**3, x, domain='QQ'), Poly(0, x, domain='QQ'), Poly(-x**3, x, domain='QQ')]])
  >>> v2 = PolyMatrix([1, 0, 0, 0, 0, 0], x)
  >>> v2.ring
  QQ[x]
  >>> pm2*v2
  PolyMatrix([[x**2]], ring=QQ[x])
code: def __new__(cls, *args, ring=None):
      if not args:
          # PolyMatrix(ring=QQ[x])
          if ring is None:
              raise TypeError(
                  "The ring needs to be specified for an empty PolyMatrix"
              )
          rows, cols, items, gens = 0, 0, [], ()
      elif isinstance(args[0], list):
          elements, gens = args[0], args[1:]
          if not elements:
              # PolyMatrix([])
              rows, cols, items = 0, 0, []
          elif isinstance(elements[0], (list, tuple)):
              # PolyMatrix([[1, 2]], x)
              rows, cols = len(elements), len(elements[0])
              items = [e for row in elements for e in row]
          else:
              # PolyMatrix([1, 2], x)
              rows, cols = len(elements), 1
              items = elements
      elif [type(a) for a in args[:3]] == [int, int, list]:
          # PolyMatrix(2, 2, [1, 2, 3, 4], x)
          rows, cols, items, gens = args[0], args[1], args[2], args[3:]
      elif [type(a) for a in args[:3]] == [int, int, type(lambda: 0)]:
          # PolyMatrix(2, 2, lambda i, j: i+j, x)
          rows, cols, func, gens = args[0], args[1], args[2], args[3:]
          items = [func(i, j) for i in range(rows) for j in range(cols)]
      else:
          raise TypeError("Invalid arguments")
  
      # PolyMatrix([[1]], x, y) vs PolyMatrix([[1]], (x, y))
      if len(gens) == 1 and isinstance(gens[0], tuple):
          gens = gens[0]
          # gens is now a tuple (x, y)
  
      return cls.from_list(rows, cols, items, gens, ring)
  
imports: from sympy.core.expr import Expr
  from sympy.core.symbol import Dummy
  from sympy.core.sympify import _sympify
  from sympy.polys.polyerrors import CoercionFailed
  from sympy.polys.polytools import Poly, parallel_poly_from_expr
  from sympy.polys.domains import QQ
  from sympy.polys.matrices import DomainMatrix
  from sympy.polys.matrices.domainscalar import DomainScalar
label_desc: Use image node_id 1 for calling the MutablePolyDenseMatrix obj's underlying member method code with example usage: obj.__new__(cls) and returns: cls