class_docstr: Base class for all metric-learners.
  
  Parameters
  ----------
  preprocessor : array-like, shape=(n_samples, n_features) or callable
    The preprocessor to call to get tuples from indices. If array-like,
    tuples will be gotten like this: X[indices].
class_docstr_tok: ["Base","class","for","all","metric-learners",".","Parameters","--","--","--","--","--","preprocessor",":","array-like",",","shape=","(","n_samples",",","n_features",")","or","callable","The","preprocessor","to","call","to","get","tuples","from","indices",".","If","array-like",",","tuples","will","be","gotten","like","this",":","X","[","indices","]","."]
docstr: Initializes the preprocessor and processes inputs. See `check_input`
  for more details.
  
  Parameters
  ----------
  X : array-like
    The input data array to check.
  
  y : array-like
    The input labels array to check.
  
  type_of_inputs : `str` {'classic', 'tuples'}
    The type of inputs to check. If 'classic', the input should be
    a 2D array-like of points or a 1D array like of indicators of points. If
    'tuples', the input should be a 3D array-like of tuples or a 2D
    array-like of indicators of tuples.
  
  **kwargs : dict
    Arguments to pass to check_input.
  
  Returns
  -------
  X : `numpy.ndarray`
    The checked input data array.
  
  y : `numpy.ndarray` (optional)
    The checked input labels array.
docstr_tok: ["Initializes","the","preprocessor","and","processes","inputs",".","See","`","check_input","`","for","more","details",".","Parameters","--","--","--","--","--","X",":","array-like","The","input","data","array","to","check",".","y",":","array-like","The","input","labels","array","to","check",".","type_of_inputs",":","`","str","`","{","'classic","'",",","'tuples","'","}","The","type","of","inputs","to","check",".","If","'classic","'",",","the","input","should","be","a","2D","array-like","of","points","or","a","1D","array","like","of","indicators","of","points",".","If","'tuples","'",",","the","input","should","be","a","3D","array-like","of","tuples","or","a","2D","array-like","of","indicators","of","tuples",".","*","*","kwargs",":","dict","Arguments","to","pass","to","check_input",".","Returns","--","--","--","-","X",":","`","numpy.ndarray","`","The","checked","input","data","array",".","y",":","`","numpy.ndarray","`","(","optional",")","The","checked","input","labels","array","."]
code: def _prepare_inputs(
      self, X, y=None, type_of_inputs="classic", **kwargs
  ):
      """Initializes the preprocessor and processes inputs. See `check_input`
      for more details.
  
      Parameters
      ----------
      X : array-like
        The input data array to check.
  
      y : array-like
        The input labels array to check.
  
      type_of_inputs : `str` {'classic', 'tuples'}
        The type of inputs to check. If 'classic', the input should be
        a 2D array-like of points or a 1D array like of indicators of points. If
        'tuples', the input should be a 3D array-like of tuples or a 2D
        array-like of indicators of tuples.
  
      **kwargs : dict
        Arguments to pass to check_input.
  
      Returns
      -------
      X : `numpy.ndarray`
        The checked input data array.
  
      y : `numpy.ndarray` (optional)
        The checked input labels array.
      """
      self._check_preprocessor()
  
      check_is_fitted(self, ["preprocessor_"])
      outs = check_input(
          X,
          y,
          type_of_inputs=type_of_inputs,
          preprocessor=self.preprocessor_,
          estimator=self,
          tuple_size=getattr(self, "_tuple_size", None),
          **kwargs,
      )
      # Conform to SLEP010
      if not hasattr(self, "n_features_in_"):
          self.n_features_in_ = (outs if y is None else outs[0]).shape[
              1
          ]
      return outs
  
imports: from sklearn.base import BaseEstimator, ClassifierMixin
  from sklearn.utils.extmath import stable_cumsum
  from sklearn.utils.validation import _is_arraylike, check_is_fitted
  from sklearn.metrics import roc_auc_score, roc_curve, precision_recall_curve
  import numpy
  from abc import ABCMeta, abstractmethod
  from ._util import ArrayIndexer, check_input, validate_vector
  import warnings
label_desc: Use image node_id 6 for calling the BaseMetricLearner obj's underlying member method code with example usage: obj._prepare_inputs(X, y, type_of_inputs) and returns: outs