def METHOD_NAME(name):
    sub_class = getattr(m5.objects, name, None)
    def tester(cls):
        return (
            sub_class is not None
            and cls is not None
            and issubclass(cls, sub_class)
        )
    return tester