def __subclasscheck__(cls, subclass):
    """``issubclass(subclass, cls)``"""
    if cls is subclass:
        return True
    try:
        template = subclass.template
    except AttributeError:
        return False
    else:
        if template == cls.template:
            if cls.specialisations is None:
                return True
            else:
                return cls._subclasscheck_specialisation(subclass)
        return False
