code: def _check_save_and_load(dense_matrix):
      for matrix_class in [
          csc_matrix,
          csr_matrix,
          bsr_matrix,
          dia_matrix,
          coo_matrix,
      ]:
          matrix = matrix_class(dense_matrix)
          loaded_matrix = _save_and_load(matrix)
          assert_(type(loaded_matrix) is matrix_class)
          assert_(loaded_matrix.shape == dense_matrix.shape)
          assert_(loaded_matrix.dtype == dense_matrix.dtype)
          assert_equal(loaded_matrix.toarray(), dense_matrix)
  
file_path: catboost/contrib/python/scipy/py3/scipy/sparse/tests/test_matrix_io.py
imports: import os
  import numpy
  import tempfile
  from pytest import raises
  from numpy.testing import assert_equal, assert_
  from scipy.sparse import csc_matrix, csr_matrix, bsr_matrix, dia_matrix, coo_matrix, save_npz, load_npz, dok_matrix
label_desc: Use image node_id 2 for calling a global function with example usage: _check_save_and_load(dense_matrix) without return types