Bugfix
- fix 'UnboundLocalError: local variable 'part_sizes' referenced before assignment' issue