completes and document annealing.py as an example