code: def trustworthiness_vector(
      source, embedding, max_k, metric="euclidean"
  ):  # pragma: no cover
      tree = KDTree(embedding, metric=metric)
      indices_embedded = tree.query(
          embedding, k=max_k, return_distance=False
      )
      # Drop the actual point itself
      indices_embedded = indices_embedded[:, 1:]
  
      dist = named_distances[metric]
  
      vec_calculator = make_trustworthiness_calculator(dist)
  
      result = vec_calculator(source, indices_embedded, max_k)
  
      return result
  
imports: import numpy
  import numba
  from sklearn.neighbors import KDTree
  from umap.distances import named_distances
label_desc: Use image node_id 3 for calling a global function with example usage: trustworthiness_vector(source, embedding, max_k, metric) and returns: result