Citing a stackoverflow answer that helped me with sorting a dict by value