code: def test_to_matrix():
      x = np.ones((4, 2))
      mat = to_matrix(x)
      assert mat.numRows == 4
      assert mat.numCols == 2
  
imports: import numpy
  from elephas.mllib.adapter import *
  from pyspark.mllib.linalg import Matrices, Vectors
label_desc: Use image node_id 1 for calling a global function with example usage: test_to_matrix() without return types