Python Global Variable Not Accessible In Function In Excel