Add abstractmethod to from_dict class method.