Decoding topological quantum error-correcting codes in Python