code: def test_umap_fit_instance_returned():
      # Test that fit returns a new UMAP instance
  
      # Passing both data and targets
      u = UMAP()
      x = np.random.uniform(0, 1, (256, 10))
      y = np.random.randint(10, size=(256,))
      res = u.fit(x, y)
      assert isinstance(res, UMAP)
  
      # Passing only data
      u = UMAP()
      x = np.random.uniform(0, 1, (256, 10))
      res = u.fit(x)
      assert isinstance(res, UMAP)
  
imports: import warnings
  import numpy
  from sklearn.metrics import pairwise_distances
  import pytest
  import numba
  from umap import UMAP
  import umap.validation
label_desc: Use image node_id 35 for calling a global function with example usage: test_umap_fit_instance_returned() without return types