code: def ones(*args, **kwargs):
      """Returns a matrix of ones with ``rows`` rows and ``cols`` columns;
      if ``cols`` is omitted a square matrix will be returned.
  
      See Also
      ========
  
      zeros
      eye
      diag
      """
  
      if "c" in kwargs:
          kwargs["cols"] = kwargs.pop("c")
  
      return Matrix.ones(*args, **kwargs)
  
imports: import random
  from sympy.core.basic import Basic
  from sympy.core.singleton import S
  from sympy.core.symbol import Symbol
  from sympy.core.sympify import sympify
  from sympy.functions.elementary.trigonometric import cos, sin
  from sympy.utilities.decorator import doctest_depends_on
  from sympy.utilities.exceptions import sympy_deprecation_warning
  from sympy.utilities.iterables import is_sequence
  from .exceptions import ShapeError
  from .decompositions import _cholesky, _LDLdecomposition
  from .matrixbase import MatrixBase
  from .repmatrix import MutableRepMatrix, RepMatrix
  from .solvers import _lower_triangular_solve, _upper_triangular_solve
label_desc: Use image node_id 20 for calling a global function with example usage: ones() and returns: Matrix