code: def test_to_python():
      m = Matrix(5, 5)
  
      assert m[2, 3] == 0
      m[2, 3] = 4
      assert m[2, 3] == 4
  
      m2 = np.array(m, copy=False)
      assert m2.shape == (5, 5)
      assert abs(m2).sum() == 4
      assert m2[2, 3] == 4
      m2[2, 3] = 5
      assert m2[2, 3] == 5
  
      cstats = ConstructorStats.get(Matrix)
      assert cstats.alive() == 1
      del m
      pytest.gc_collect()
      assert cstats.alive() == 1
      del m2  # holds an m reference
      pytest.gc_collect()
      assert cstats.alive() == 0
      assert cstats.values() == ["5x5 matrix"]
      assert cstats.copy_constructions == 0
      # assert cstats.move_constructions >= 0  # Don't invoke any
      assert cstats.copy_assignments == 0
      assert cstats.move_assignments == 0
  
imports: import pytest
  from pybind11_tests import Matrix, ConstructorStats
label_desc: Use image node_id 2 for calling a global function with example usage: test_to_python() without return types