code: def plot_neighborhood_graph(x, nn, y, axis=plt, colors="rbgmky"):
      for i, a in enumerate(x):
          b = x[nn[i, 1]]
          axis.plot((a[0], b[0]), (a[1], b[1]), colors[y[i]])
  
file_path: metric-learn/examples/plot_sandwich.py
imports: import numpy
  from matplotlib import pyplot
  from sklearn.metrics import pairwise_distances
  from sklearn.neighbors import NearestNeighbors
  from metric_learn import LMNN, ITML_Supervised, LSML_Supervised, SDML_Supervised
label_desc: Use image node_id 6 for calling a global function with example usage: plot_neighborhood_graph(x, nn, y, axis, colors) without return types