code: def test_convert_matrix(spark):
      str_list = ["a", "b"]
      df = spark.createDataFrame(str_list, StringType())
      ndarray = np.array([[1.0, 2.1, 3.2], [4.3, 5.4, 6.5]])
      output_rows = df.withColumn("matrix", lit(ndarray)).collect()
      expected_matrix = DenseMatrix(
          2, 3, [1.0, 4.3, 2.1, 5.4, 3.2, 6.5]
      )
      assert output_rows[0].matrix == expected_matrix
      assert output_rows[1].matrix == expected_matrix
  
file_path: glow/python/glow/tests/test_conversions.py
imports: from glow.conversions import OneDimensionalDoubleNumpyArrayConverter, TwoDimensionalDoubleNumpyArrayConverter
  from importlib import reload
  import numpy
  from py4j.protocol import Py4JJavaError
  from pyspark.ml.linalg import DenseMatrix
  from pyspark.sql.functions import lit
  from pyspark.sql.types import StringType
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: test_convert_matrix(spark) without return types