<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _build_kernel(self):
 """Private method to build kernel matrix Runs public method to build kernel matrix and runs additional checks to ensure that the result is okay Returns ------- Kernel matrix, shape=[n_samples, n_samples] Raises ------ RuntimeWarning : if K is not symmetric """

        kernel = self.build_kernel()
        kernel = self.symmetrize_kernel(kernel)
        kernel = self.apply_anisotropy(kernel)
        if (kernel - kernel.T).max() > 1e-5:
            warnings.warn("K should be symmetric", RuntimeWarning)
        if np.any(kernel.diagonal == 0):
            warnings.warn("K should have a non-zero diagonal", RuntimeWarning)
        return kernel