Cardiac devices in the form of pacemakers or implantable defibrillators may also be required to treat arrhythmias. Pacemakers, comprising a small battery powered generator implanted under the skin and one or more leads that extend to the heart, are most commonly used to treat abnormally slow heart rhythms. Implantable defibrillators are used to treat serious life-threatening rapid heart rhythms. These devices monitor the heart, and if dangerous heart racing is detected can automatically deliver a shock to restore the heart to a normal rhythm. Implantable defibrillators are most commonly used in patients with heart failure, cardiomyopathies, or inherited arrhythmia syndromes.