Python implementation of the context tree weighting (CTW) method for sequential probability assignment.