code: def to_sympy(m, **options):
      """Convert a numpy/scipy.sparse matrix to a SymPy matrix."""
      if isinstance(m, MatrixBase):
          return m
      elif isinstance(m, numpy_ndarray):
          return numpy_to_sympy(m)
      elif isinstance(m, scipy_sparse_matrix):
          return scipy_sparse_to_sympy(m)
      elif isinstance(m, Expr):
          return m
      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 5 for calling a global function with example usage: to_sympy(m) and returns: m, numpy_to_sympy, scipy_sparse_to_sympy, m