Thanks Kenny! I will cherry pick your changes and start from there.
Originally, I wanted to do this task together with SYNPY-520. However, scope is getting bigger as I look more into it. So I separate this work out and check in smaller chunk of code: https://github.com/Sage-Bionetworks/synapsePythonClient/pull/550 Mostly just Kenny's code and a test.