(jebene/cgates/kmeng): edited expand.py