code: def test_decompose_fit():
      srand()
  
      D = sklearn.decomposition.NMF(random_state=0)
  
      X = np.array([[1, 2, 3, 4, 5, 6], [1, 1, 1.2, 1, 0.8, 1]])
  
      # Do a first fit
      (W, H) = librosa.decompose.decompose(X, transformer=D, fit=True)
  
      # Make random data and decompose with the same basis
      X = np.asarray(np.random.randn(*X.shape) ** 2)
      (W2, H2) = librosa.decompose.decompose(
          X, transformer=D, fit=False
      )
  
      # Make sure the basis hasn't changed
      assert np.allclose(W, W2)
  
imports: import os
  import numpy
  import scipy.sparse
  import librosa
  import sklearn.decomposition
  import pytest
  from test_core import srand
label_desc: Use image node_id 3 for calling a global function with example usage: test_decompose_fit() without return types