In the provided examples a method 'text_to_format' is mentioned that was not imported. NameError: name 'text_to_format' is not defined