code: def test_theano_function_matrix():
      m = sy.Matrix([[x, y], [z, x + y + z]])
      expected = np.array([[1.0, 2.0], [3.0, 1.0 + 2.0 + 3.0]])
      f = theano_function_([x, y, z], [m])
      np.testing.assert_allclose(f(1.0, 2.0, 3.0), expected)
      f = theano_function_([x, y, z], [m], scalar=True)
      np.testing.assert_allclose(f(1.0, 2.0, 3.0), expected)
      f = theano_function_([x, y, z], [m, m])
      assert isinstance(f(1.0, 2.0, 3.0), type([]))
      np.testing.assert_allclose(f(1.0, 2.0, 3.0)[0], expected)
      np.testing.assert_allclose(f(1.0, 2.0, 3.0)[1], expected)
  
imports: import logging
  from sympy.external import import_module
  from sympy.testing.pytest import raises, SKIP, warns_deprecated_sympy
  import sympy
  from sympy.core.singleton import S
  from sympy.abc import x, y, z, t
  from sympy.printing.theanocode import theano_code, dim_handling, theano_function
label_desc: Use image node_id 27 for calling a global function with example usage: test_theano_function_matrix() without return types