Sort dict with key of user class

I think it is duplicate of this discussion: