def METHOD_NAME(self):
    r"""Solve the eigenproblem.
    Returns
    -------
    int
        The number of Eigenvalues found.
    """
    self.A_mat = assemble(self._problem.A, bcs=self._problem.bcs).M.handle
    self.M_mat = assemble(
        self._problem.M, bcs=self._problem.bcs,
        weight=self._problem.bc_shift and 1./self._problem.bc_shift
    ).M.handle
    self.es.setDimensions(nev=self.n_evals, ncv=self.ncv, mpd=self.mpd)
    self.es.setOperators(self.A_mat, self.M_mat)
    with self.inserted_options():
        self.es.METHOD_NAME()
    nconv = self.es.getConverged()
    if nconv == 0:
        raise ConvergenceError("Did not converge any eigenvalues.")
    return nconv