Helper scripts in Python for Megatron