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