code: def predict(self, X):
          
          K = pairwise_kernels(self.X, X, metric=self.kernel, gamma=self.gamma)
          return (K * self.y[:, None]).sum(axis=0) / K.sum(axis=0)
docs: Predict target values for X.
  
          Parameters
          ----------
          X : array-like of shape = [n_samples, n_features]
              The input samples.
  
          Returns
          -------
          y : array of shape = [n_samples]
              The predicted target value.