Moving work on BLD-465 from PR 1811. Fixing missing import clause in Python. Addressing DB's comment. BLD-465.