code: def test_internals_api(n_components):
      callback = CustomCallback()
      reducer = UMAP(n_components=n_components, callback=callback)
      reducer.fit(data)
      callback.check()
  
      # Make sure super().__init__ is called
      callback = CustomCallback(skip_init=True)
      model = UMAP(n_epochs=10, callback=callback)
  
      with pytest.raises(ValueError):
          model.fit_transform(data)
  
file_path: cuml/python/cuml/tests/test_internals_api.py
imports: import pytest
  from cuml.manifold import UMAP
  from cuml.internals import GraphBasedDimRedCallback
  from sklearn.datasets import load_digits
label_desc: Use image node_id 1 for calling a global function with example usage: test_internals_api(n_components) without return types