from abc import ABC, abstractmethod class MessageFactory(ABC): @staticmethod @abstractmethod def new(raw_message) -> object: pass