For example, if you want to add an early stopping callback to the training loop after 10 steps.