code: def test_predict_minibatch(self):
      umap_model = umap.UmapModel(n_components=3)
  
      # Test falsy return value when umap hasn't been initialized.
      num_dims = 10
      inputs = testing_utils.fake_projection_input(1, num_dims)
      output = umap_model.predict_minibatch(inputs)
      self.assertEqual(list(output)[0]["z"], [0, 0, 0])
  
      # Make dummy embeddings to warm start.
      umap_model.fit_transform(
          testing_utils.fake_projection_input(100, num_dims)
      )
  
      # Test that we can now predict a minibatch.
      output = umap_model.predict_minibatch(inputs)
      output_shape = np.array(list(output)[0]["z"]).shape
      self.assertFalse(np.any(np.iscomplex(output)))
      self.assertEqual(output_shape, (3,))
  
file_path: lit/lit_nlp/components/umap_test.py
imports: from absl.testing import absltest
  from lit_nlp.components import umap
  from lit_nlp.lib import testing_utils
  import numpy
label_desc: Use image node_id 2 for calling the UmapTest obj's underlying member method code with example usage: obj.test_predict_minibatch() without return types