code: def test_sparse_matrix_norms_with_axis(self):
      for sparse_type in self._sparse_types:
          for M in self._test_matrices:
              S = sparse_type(M)
              for axis in None, (0, 1), (1, 0):
                  assert_allclose(
                      spnorm(S, axis=axis), npnorm(M, axis=axis)
                  )
                  for ord in "fro", np.inf, -np.inf, 1, -1:
                      assert_allclose(
                          spnorm(S, ord, axis=axis),
                          npnorm(M, ord, axis=axis),
                      )
              # Some numpy matrix norms are allergic to negative axes.
              for axis in (-2, -1), (-1, -2), (1, -2):
                  assert_allclose(
                      spnorm(S, axis=axis), npnorm(M, axis=axis)
                  )
                  assert_allclose(
                      spnorm(S, "f", axis=axis),
                      npnorm(M, "f", axis=axis),
                  )
                  assert_allclose(
                      spnorm(S, "fro", axis=axis),
                      npnorm(M, "fro", axis=axis),
                  )
  
file_path: catboost/contrib/python/scipy/py3/scipy/sparse/linalg/tests/test_norm.py
imports: import numpy
  from numpy.linalg import norm
  from numpy.testing import assert_allclose
  from pytest import raises
  import scipy.sparse
  from scipy.sparse.linalg import norm
label_desc: Use image node_id 2 for calling the TestVsNumpyNorm obj's underlying member method code with example usage: obj.test_sparse_matrix_norms_with_axis() without return types