Switch to classmethod from_dict.