code: def test_matrix_from_list():
      m = matrix([[0, 1, 2], [3, 4, 5], [6, 7, 8]])
      assert m.nr() == 3
      assert m.nc() == 3
      assert m.shape == (3, 3)
      assert len(m) == 3
      assert (
          repr(m)
          == "< dlib.matrix containing: \n0 1 2 \n3 4 5 \n6 7 8 >"
      )
      assert str(m) == "0 1 2 \n3 4 5 \n6 7 8"
  
      deser = pickle.loads(pickle.dumps(m, 2))
  
      for row in range(3):
          for col in range(3):
              assert m[row][col] == deser[row][col]
  
file_path: dlib/tools/python/test/test_matrix.py
imports: from dlib import matrix
  from pytest import raises
label_desc: Use image node_id 2 for calling a global function with example usage: test_matrix_from_list() without return types