Context-aware controller inference for stabilizing dynamical systems from scarce data