code: def test_save_load(moon_dataset):
      """tests saving and loading"""
  
      embedder = ParametricUMAP()
      embedding = embedder.fit_transform(moon_dataset)
      # completes successfully
      assert embedding is not None
      assert embedding.shape == (moon_dataset.shape[0], 2)
  
      # Portable tempfile
      model_path = tempfile.mkdtemp(suffix="_umap_model")
  
      embedder.save(model_path)
      loaded_model = load_ParametricUMAP(model_path)
      assert loaded_model is not None
  
      loaded_embedding = loaded_model.transform(moon_dataset)
      assert_array_almost_equal(
          embedding,
          loaded_embedding,
          decimal=5,
          err_msg="Loaded model transform fails to match original embedding",
      )
  
file_path: umap/umap/tests/test_parametric_umap.py
imports: import numpy
  import tempfile
  import pytest
  from sklearn.datasets import make_moons
  from sklearn.model_selection import train_test_split
  from numpy.testing import assert_array_almost_equal
  import platform
label_desc: Use image node_id 8 for calling a global function with example usage: test_save_load(moon_dataset) without return types