https://medium.com/@ryk.kiel/unlocking-the-power-of-structural-pattern-matching-in-python-3-10-d432c9946a87