docs: def extend_to_data(self, data, **kwargs):
          """Build transition matrix from new data to the graph
  
          Creates a transition matrix such that `Y` can be approximated by
          a linear combination of landmarks. Any
          transformation of the landmarks can be trivially applied to `Y` by
          performing
  
          `transform_Y = transitions.dot(transform)`
  
          Parameters
          ----------
  
          Y: array-like, [n_samples_y, n_features]
              new data for which an affinity matrix is calculated
              to the existing data. `n_features` must match
              either the ambient or PCA dimensions
  
          Returns
          -------
  
          transitions : array-like, [n_samples_y, self.data.shape[0]]
              Transition matrix from `Y` to `self.data`
          """
          kernel = self.build_kernel_to_data(data, **kwargs)
          if sparse.issparse(kernel):
              pnm = sparse.hstack(
                  [sparse.csr_matrix(kernel[:, self.clusters == i].sum(
                      axis=1)) for i in np.unique(self.clusters)])
          else:
              pnm = np.array([np.sum(
                  kernel[:, self.clusters == i],
                  axis=1).T for i in np.unique(self.clusters)]).transpose()
          pnm = normalize(pnm, norm='l1', axis=1)
          return pnm