Make from_dict a class method. Which makes it much easier for inheritance.