Firefighters learn to rescue and revive pets