code: def to_numpy(m, **options):
      """Convert a sympy/scipy.sparse matrix to a numpy matrix."""
      dtype = options.get("dtype", "complex")
      if isinstance(m, (MatrixBase, Expr)):
          return sympy_to_numpy(m, dtype=dtype)
      elif isinstance(m, numpy_ndarray):
          return m
      elif isinstance(m, scipy_sparse_matrix):
          return m.todense()
      raise TypeError(
          "Expected sympy/numpy/scipy.sparse matrix, got: %r" % m
      )
  
imports: from sympy.core.expr import Expr
  from sympy.core.numbers import I
  from sympy.core.singleton import S
  from sympy.matrices.matrixbase import MatrixBase
  from sympy.matrices import eye, zeros
  from sympy.external import import_module
label_desc: Use image node_id 6 for calling a global function with example usage: to_numpy(m) and returns: sympy_to_numpy, m, m