def _base_class_object_build(node, member, basenames, name=None, localname=None):
klass = build_class(<EOL>name or getattr(member, "<STR_LIT>", None) or localname,<EOL>basenames,<EOL>member.__doc__,<EOL>)<EOL>klass._newstyle = isinstance(member, type)<EOL>node.add_local_node(klass, localname)<EOL>try:<EOL><INDENT>if issubclass(member, Exception):<EOL><INDENT>instdict = member().__dict__<EOL><DEDENT>else:<EOL><INDENT>raise TypeError<EOL><DEDENT><DEDENT>except TypeError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>for item_name, obj in instdict.items():<EOL><INDENT>valnode = nodes.EmptyNode()<EOL>valnode.object = obj<EOL>valnode.parent = klass<EOL>valnode.lineno = <NUM_LIT:1><EOL>klass.instance_attrs[item_name] = [valnode]<EOL><DEDENT><DEDENT>return klass<EOL>
create astroid for a living class object, with a given set of base names
    (e.g. ancestors)