def METHOD_NAME(cls):
    def get_subclasses(cls):
        """returns all subclasses of argument, cls"""
        if issubclass(cls, type):
            subclasses = cls.__subclasses__(cls)
        else:
            subclasses = cls.__subclasses__()
        for subclass in subclasses:
            subclasses.extend(get_subclasses(subclass))
        return subclasses
    messages_cls = get_subclasses(cls)
    return messages_cls