Change to classmethod for from_dicts.