def factory_method(cls, **kwargs) -> Message: translation = { "identifier": "identifier", "object_user": "******", "object_channel": "channel", "date": "date", "content": "content", "author_id": "author_id", "references_id": "references_id", } translated_args = cls.translate_kwargs(cls, translation=translation, args=kwargs) date = DateTimeField().clean(translated_args["date"]) tz = pytz.timezone("Europe/Paris") date.replace(tzinfo=tz) translated_args["date"] = date return Message(**translated_args)