Pull request #1702: PIPE-2698: fix a `string.format` use bug.
Merge in PIPE/pipeline from PIPE-2698-str-formatting-fix to main
* commit '9beb677e889ee835b6ef06701aeb8dba7b5082b4': PIPE-2698: deduplicate while preserving the order. PIPE-2698: fix a `string.format` use bug; minior codestyle updates.