Refactored the 'format' parameter to 'frmt' because the keyword with that name is already reserved in Python