Never used Python - Assuming compact removes null values, then register-input (line 55) will need to be changed - no hard task.