code: def test_inplace_row_scale():
      rng = np.random.RandomState(0)
      X = sp.rand(100, 200, 0.05)
      Xr = X.tocsr()
      Xc = X.tocsc()
      XA = X.toarray()
      scale = rng.rand(100)
      XA *= scale.reshape(-1, 1)
  
      inplace_row_scale(Xc, scale)
      inplace_row_scale(Xr, scale)
      assert_array_almost_equal(Xr.toarray(), Xc.toarray())
      assert_array_almost_equal(XA, Xc.toarray())
      assert_array_almost_equal(XA, Xr.toarray())
      with pytest.raises(TypeError):
          inplace_column_scale(X.tolil(), scale)
  
      X = X.astype(np.float32)
      scale = scale.astype(np.float32)
      Xr = X.tocsr()
      Xc = X.tocsc()
      XA = X.toarray()
      XA *= scale.reshape(-1, 1)
      inplace_row_scale(Xc, scale)
      inplace_row_scale(Xr, scale)
      assert_array_almost_equal(Xr.toarray(), Xc.toarray())
      assert_array_almost_equal(XA, Xc.toarray())
      assert_array_almost_equal(XA, Xr.toarray())
      with pytest.raises(TypeError):
          inplace_column_scale(X.tolil(), scale)
  
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 15 for calling a global function with example usage: test_inplace_row_scale() without return types