https://mysteryweevil.medium.com/mastering-file-like-objects-in-python-unlock-the-power-of-custom-i-o-9399333325ce