I see that most of the code does not contain type-hints that harms readability, please, do not be lazy and add them at least to functions