Docker's parser chokes on multi-line Python in RUN. Moved to scripts/patch_utils.py and COPY + RUN it.