Port any relevant changes in https://github.com/sillsdev/machine/pull/393 from machine to machine.py. <!-- AUTO-GENERATED-ISSUE -->