Constrained Machine Learning: The Bagel Framework