def _check_inferred_class_is_abstract(self, inferred, node):
    if (not isinstance(inferred, astroid.ClassDef)):
        return
    klass = utils.node_frame_class(node)
    if (klass is inferred):
        return
    abstract_methods = _has_abstract_methods(inferred)
    if (not abstract_methods):
        return
    metaclass = inferred.metaclass()
    if (metaclass is None):
        for ancestor in inferred.ancestors():
            if (ancestor.qname() == 'abc.ABC'):
                self.add_message('abstract-class-instantiated', args=(inferred.name,), node=node)
                break
        return
    if (metaclass.qname() in ABC_METACLASSES):
        self.add_message('abstract-class-instantiated', args=(inferred.name,), node=node)
def _check_inferred_class_is_abstract(self, inferred, node):
    if (not isinstance(inferred, astroid.ClassDef)):
        return
    klass = utils.node_frame_class(node)
    if (klass is inferred):
        return
    abstract_methods = _has_abstract_methods(inferred)
    if (not abstract_methods):
        return
    metaclass = inferred.metaclass()
    if (metaclass is None):
        for ancestor in inferred.ancestors():
            if (ancestor.qname() == 'abc.ABC'):
                self.add_message('abstract-class-instantiated', args=(inferred.name,), node=node)
                break
        return
    if (metaclass.qname() in ABC_METACLASSES):
        self.add_message('abstract-class-instantiated', args=(inferred.name,), node=node)