code: def decision_function(self, pairs):
      
      pairs = check_input(pairs, type_of_inputs='tuples',
                          preprocessor=self.preprocessor_,
                          estimator=self, tuple_size=self._tuple_size)
      return - self.score_pairs(pairs)
docs: Returns the decision function used to classify the pairs.
  
      Returns the opposite of the learned metric value between samples in every
      pair, to be consistent with scikit-learn conventions. Hence it should
      ideally be low for dissimilar samples and high for similar samples.
      This is the decision function that is used to classify pairs as similar
      (+1), or dissimilar (-1).
  
      Parameters
      ----------
      pairs : array-like, shape=(n_pairs, 2, n_features) or (n_pairs, 2)
        3D Array of pairs to predict, with each row corresponding to two
        points, or 2D array of indices of pairs if the metric learner uses a
        preprocessor.
  
      Returns
      -------
      y_predicted : `numpy.ndarray` of floats, shape=(n_constraints,)
        The predicted decision function value for each pair.