code: def test_csc_row_median(csc_container, csr_container):
      # Test csc_row_median actually calculates the median.
  
      # Test that it gives the same output when X is dense.
      rng = np.random.RandomState(0)
      X = rng.rand(100, 50)
      dense_median = np.median(X, axis=0)
      csc = csc_container(X)
      sparse_median = csc_median_axis_0(csc)
      assert_array_equal(sparse_median, dense_median)
  
      # Test that it gives the same output when X is sparse
      X = rng.rand(51, 100)
      X[X < 0.7] = 0.0
      ind = rng.randint(0, 50, 10)
      X[ind] = -X[ind]
      csc = csc_container(X)
      dense_median = np.median(X, axis=0)
      sparse_median = csc_median_axis_0(csc)
      assert_array_equal(sparse_median, dense_median)
  
      # Test for toy data.
      X = [[0, -2], [-1, -1], [1, 0], [2, 1]]
      csc = csc_container(X)
      assert_array_equal(csc_median_axis_0(csc), np.array([0.5, -0.5]))
      X = [[0, -2], [-1, -5], [1, -3]]
      csc = csc_container(X)
      assert_array_equal(csc_median_axis_0(csc), np.array([0.0, -3]))
  
      # Test that it raises an Error for non-csc matrices.
      with pytest.raises(TypeError):
          csc_median_axis_0(csr_container(X))
  
imports: import numpy
  import pytest
  import scipy.sparse
  from numpy.random import RandomState
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from scipy import linalg
  from sklearn.datasets import make_classification
  from sklearn.utils._testing import assert_allclose
  from sklearn.utils.fixes import CSC_CONTAINERS, CSR_CONTAINERS, LIL_CONTAINERS
  from sklearn.utils.sparsefuncs import _implicit_column_offset, count_nonzero, csc_median_axis_0, incr_mean_variance_axis, inplace_column_scale, inplace_row_scale, inplace_swap_column, inplace_swap_row, mean_variance_axis, min_max_axis
  from sklearn.utils.sparsefuncs_fast import assign_rows_csr, csr_row_norms, inplace_csr_row_normalize_l1, inplace_csr_row_normalize_l2
label_desc: Use image node_id 21 for calling a global function with example usage: test_csc_row_median(csc_container, csr_container) without return types