code: def binary_check(metric, binary_data, binary_distances):
      # Check that metric is supported for this test, otherwise, fail!
      assert (
          metric in binary_distances
      ), f"{metric} not valid for binary data"
      dist_matrix = pairwise_distances(binary_data, metric=metric)
  
      if metric in ("jaccard", "dice", "sokalsneath", "yule"):
          dist_matrix[np.where(~np.isfinite(dist_matrix))] = 0.0
  
      if metric in ("kulsinski", "russellrao"):
          dist_matrix[np.where(~np.isfinite(dist_matrix))] = 0.0
          # And because distance between all zero vectors should be zero
          dist_matrix[10, 11] = 0.0
          dist_matrix[11, 10] = 0.0
  
      run_test_metric(metric, binary_data, dist_matrix)
  
imports: import numpy
  from numpy.testing import assert_array_almost_equal
  import umap.distances
  import umap.sparse
  from sklearn.metrics import pairwise_distances
  from sklearn.neighbors import BallTree
  from scipy.version import full_version
  import pytest
label_desc: Use image node_id 3 for calling a global function with example usage: binary_check(metric, binary_data, binary_distances) without return types