Converted Enigma notebook to Python file, included tests as doctest