code: def test_validation(moon_dataset):
      """tests adding a validation dataset"""
      X_train, X_valid = train_test_split(moon_dataset, train_size=0.5)
      embedder = ParametricUMAP(
          parametric_reconstruction=True,
          reconstruction_validation=X_valid,
          verbose=True,
      )
      embedding = embedder.fit_transform(X_train)
      # completes successfully
      assert embedding is not None
      assert embedding.shape == (X_train.shape[0], 2)
  
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 7 for calling a global function with example usage: test_validation(moon_dataset) without return types