A Contraction Theory Approach to Optimization Algorithms from Acceleration Flows