'Dump class definition, doc string and class body.'

def build_class(self, code):

    assert (type(code) == CodeType)
    code = Code(code, self.scanner, self.currentclass)
    indent = self.indent
    ast = self.build_ast(code._tokens, code._customize)
    code._tokens = None
    assert (ast == 'stmts')
    if (ast[0][0] == NAME_MODULE):
        del ast[0]
    if (code.co_consts and (code.co_consts[0] != None) and (ast[0][0] == ASSIGN_DOC_STRING(code.co_consts[0]))):
        self.print_docstring(indent, code.co_consts[0])
        self.print_()
        del ast[0]
    if (ast[(-1)][0] == RETURN_LOCALS):
        del ast[(-1)]
    for g in find_globals(ast, set()):
        self.print_(indent, 'global    ', g)
    self.gen_source(ast, code._customize)
    code._tokens = None
    code._customize = None
