A Necessary and Sufficient Stability Notion for Adaptive Generalization