code: def test_chunked_parallel_alternative_implementations(
      spatial_data, workaround_590_impl
  ):
      # Base tests that must pass!
      dist_matrix_x = workaround_590_impl(np.abs(spatial_data[:-2]))
      dist_matrix_xy = workaround_590_impl(
          np.abs(spatial_data[:-2]), np.abs(spatial_data[:-2])
      )
  
      dist_matrix_x_full = dist.chunked_parallel_special_metric(
          np.abs(spatial_data[:-2])
      )
      dist_matrix_xy_full = dist.chunked_parallel_special_metric(
          np.abs(spatial_data[:-2]), np.abs(spatial_data[:-2])
      )
  
      assert_array_equal(
          dist_matrix_x_full,
          dist_matrix_x,
          err_msg="Distances don't match for metric hellinger",
      )
  
      assert_array_equal(
          dist_matrix_xy_full,
          dist_matrix_xy,
          err_msg="Distances don't match for metric hellinger",
      )
  
file_path: umap/umap/tests/test_chunked_parallel_spatial_metric.py
imports: import pytest
  import numba
  import os
  import numpy
  from numpy.testing import assert_array_equal
  from umap import distances
label_desc: Use image node_id 4 for calling a global function with example usage: test_chunked_parallel_alternative_implementations(spatial_data, workaround_590_impl) without return types