As these parts are a separate logical block I extracted them to separate funcs to:
simplify main func
name these blocks (form of documentation)
improve possibility of unit testing
Feel free to change their name (e.g. to prefix them with underscore) or/and add docstrings.
Please also add unit tests which will describe intention of author how they should work and will be in the same time a blockers for future potential regression.
As these parts are a separate logical block I extracted them to separate funcs to:
Feel free to change their name (e.g. to prefix them with underscore) or/and add docstrings. Please also add unit tests which will describe intention of author how they should work and will be in the same time a blockers for future potential regression.