Update magicstar_tools.py