Create a self-contained Python module named torch_optimizer (importable as torch_optimizer as optim) that exposes 20 lightweight optimizer classes (AccSGD, AdaBelief, AdaBound, AdaMod, AdamP, AggMo, Apollo, DiffGrad, LARS, Lamb, MADGRAD, NovoGrad, PID, QHAdam, QHM, SGDP, SGDW, SWATS, Shampoo, Yogi) as subclasses of a minimal BaseOptimizer. Implement parameter validation for learning rate, epsilon, weight_decay, and betas; zero_grad should clear only dense gradients; step should raise a RuntimeError containing "does not support sparse gradients" if any param.grad is sparse; ensure the error messages match the tests.