Closed-Loop Stimulation of Temporal Cortex Rescues Functional Networks and Improves Memory