[#858] move "import commands" to helper functions in pydevtest_common.py