code: def test_nmf_dtype_match(Estimator, solver, dtype_in, dtype_out):
      # Check that NMF preserves dtype (float32 and float64)
      X = (
          np.random.RandomState(0)
          .randn(20, 15)
          .astype(dtype_in, copy=False)
      )
      np.abs(X, out=X)
  
      nmf = Estimator(
          alpha_W=1.0,
          alpha_H=1.0,
          tol=1e-2,
          random_state=0,
          **solver,
      )
  
      assert nmf.fit(X).transform(X).dtype == dtype_out
      assert nmf.fit_transform(X).dtype == dtype_out
      assert nmf.components_.dtype == dtype_out
  
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 28 for calling a global function with example usage: test_nmf_dtype_match(Estimator, solver, dtype_in, dtype_out) without return types