Condition-based Design of Variable Impedance Controllers from User Demonstrations