code: def test_nmf_sparse_transform(Estimator, solver, csc_container):
      # Test that transform works on sparse data.  Issue #2124
      rng = np.random.mtrand.RandomState(42)
      A = np.abs(rng.randn(3, 2))
      A[1, 1] = 0
      A = csc_container(A)
  
      model = Estimator(
          random_state=0, n_components=2, max_iter=400, **solver
      )
      A_fit_tr = model.fit_transform(A)
      A_tr = model.transform(A)
      assert_allclose(A_fit_tr, A_tr, atol=1e-1)
  
imports: import re
  import sys
  import warnings
  from io import StringIO
  import numpy
  import pytest
  from scipy import linalg
  from sklearn.base import clone
  from sklearn.decomposition import NMF, MiniBatchNMF, non_negative_factorization
  from sklearn.decomposition import _nmf
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.utils._testing import assert_allclose, assert_almost_equal, assert_array_almost_equal, assert_array_equal, ignore_warnings
  from sklearn.utils.extmath import squared_norm
  from sklearn.utils.fixes import CSC_CONTAINERS, CSR_CONTAINERS
label_desc: Use image node_id 16 for calling a global function with example usage: test_nmf_sparse_transform(Estimator, solver, csc_container) without return types