Split some code to a utils.py file
Split some code to a utils.py file