def METHOD_NAME(self, U, mu, kind, least_squares=False, default_solver=''):
    if kind == 'apply_inverse':
        if least_squares:
            raise NotImplementedError
        solver = self.solver_options.get('inverse', default_solver) if self.solver_options else default_solver
        inv = self.matrix.Inverse(self.source.V.FreeDofs(), inverse=solver)
        return inv