code: def _to_index_points(self, triplets):
      shape = triplets.shape
      X, triplets = np.unique(
          np.vstack(triplets), return_inverse=True, axis=0
      )
      triplets = triplets.reshape(shape[:2])
      return triplets, X
  
imports: from __future__ import print_function, absolute_import, division
  import numpy
  from .base_metric import _TripletsClassifierMixin, MahalanobisMixin
  from ._util import components_from_metric
  from sklearn.base import TransformerMixin
  from .constraints import Constraints
  from sklearn.preprocessing import normalize
  from sklearn.neighbors import NearestNeighbors
  from sklearn.cluster import KMeans
  from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
  from sklearn.utils import check_array, check_random_state
  import warnings
label_desc: Use image node_id 5 for calling the _BaseSCML obj's underlying member method code with example usage: obj._to_index_points(triplets) and returns: triplets,  X