code: def test_umap_bad_output_metric_no_grad(nn_data):
      @numba.njit()
      def dist1(x, y):
          return np.sum(np.abs(x - y))
  
      u = UMAP(output_metric=dist1)
      with pytest.raises(ValueError):
          u.fit(nn_data)
  
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 31 for calling a global function with example usage: test_umap_bad_output_metric_no_grad(nn_data) and returns: np