def build_class(name, basenames=(), doc=None):
 node = Class(name, doc)
 for base in basenames:
  basenode = Name()
  basenode.name = base
  node.bases.append(basenode)
  basenode.parent = node
 return node

def build_class ( name , basenames = ( ) , doc = None ) : node = Class ( name , doc ) for base in basenames : basenode = Name ( ) basenode . name = base node . bases . append ( basenode ) basenode . parent = node return node
create and initialize a astroid class node .