code: def pairwise_kernel(self, X, Y):
          
          check_is_fitted(self, 'X_fit_')
          if X.shape[0] != Y.shape[0]:
              raise ValueError('X and Y have different number of features')
  
          val = pairwise_continuous_ordinal_kernel(X[self._numeric_columns], Y[self._numeric_columns],
                                                   self._numeric_ranges)
          if len(self._nominal_columns) > 0:
              val += pairwise_nominal_kernel(X[self._nominal_columns].astype(numpy.int8),
                                             Y[self._nominal_columns].astype(numpy.int8))
  
          val /= X.shape[0]
  
          return val
docs: Function to use with :func:`sklearn.metrics.pairwise.pairwise_kernels`
  
          Parameters
          ----------
          X : array, shape = (n_features,)
  
          Y : array, shape = (n_features,)
  
          Returns
          -------
          similarity : float
              Similarities are normalized to be within [0, 1]