resolve the python global variable issue.