def METHOD_NAME(self, n_samples=1, random_state=None):
    """Generate random samples from the model.
    Currently, this is implemented only for gaussian and tophat kernels.
    Parameters
    ----------
    n_samples : int, optional
        Number of samples to generate. Defaults to 1.
    random_state : RandomState or an int seed (0 by default)
        A random number generator instance.
    Returns
    -------
    X : array_like, shape (n_samples, n_features)
        List of samples.
    """
    # TODO: implement sampling for other valid kernel shapes
    if self.kernel not in ['gaussian', 'tophat']:
        raise NotImplementedError()
    data = np.asarray(self.tree_.data)
    rng = check_random_state(random_state)
    i = rng.randint(data.shape[0], size=n_samples)
    if self.kernel == 'gaussian':
        return np.atleast_2d(rng.normal(data[i], self.bandwidth))
    elif self.kernel == 'tophat':
        # we first draw points from a d-dimensional normal distribution,
        # then use an incomplete gamma function to map them to a uniform
        # d-dimensional tophat distribution.
        dim = data.shape[1]
        X = rng.normal(size=(n_samples, dim))
        s_sq = row_norms(X, squared=True)
        correction = (gammainc(0.5 * dim, 0.5 * s_sq) ** (1. / dim)
                      * self.bandwidth / np.sqrt(s_sq))
        return data[i] + X * correction[:, np.newaxis]