def is_subtype_of(self, type_name, context=None):
        """Whether this class is a subtype of the given type.

        :param type_name: The name of the type of check against.
        :type type_name: str

        :returns: True if this class is a subtype of the given type,
            False otherwise.
        :rtype: bool
        """
        if self.qname() == type_name:
            return True
        for anc in self.ancestors(context=context):
            if anc.qname() == type_name:
                return True
        return False
Whether this class is a subtype of the given type.

        :param type_name: The name of the type of check against.
        :type type_name: str

        :returns: True if this class is a subtype of the given type,
            False otherwise.
        :rtype: bool