'Dump function defintion, doc string, and function body.'

def make_function(self, node, isLambda, nested=1):

    def build_param(ast, name, default):
        'build    parameters:\n                                                                -    handle    defaults\n                                                                -    handle    format    tuple    parameters\n                                                '
        if name.startswith('.'):
            name = self.get_tuple_parameter(ast, name)
        if default:
            if self.showast:
                print '--', name
                print default
                print '--'
            result = ('%s    =    %s' % (name, self.traverse(default, indent='')))
            if (result[(-2):] == '=    '):
                result += 'None'
            return result
        else:
            return name
    defparams = node[:node[(-1)].attr]
    code = node[(-2)].attr
    assert (type(code) == CodeType)
    code = Code(code, self.scanner, self.currentclass)
    argc = code.co_argcount
    paramnames = list(code.co_varnames[:argc])
    paramnames.reverse()
    defparams.reverse()
    try:
        ast = self.build_ast(code._tokens, code._customize, isLambda=isLambda, noneInNames=('None' in code.co_names))
    except ParserError as p:
        self.write(str(p))
        self.ERROR = p
        return
    params = []
    for (name, default) in map((lambda a, b: (a, b)), paramnames, defparams):
        params.append(build_param(ast, name, default))
    params.reverse()
    if (4 & code.co_flags):
        params.append(('*%s' % code.co_varnames[argc]))
        argc += 1
    if (8 & code.co_flags):
        params.append(('**%s' % code.co_varnames[argc]))
        argc += 1
    indent = self.indent
    if isLambda:
        self.write('lambda    ', ',    '.join(params), ':    ')
    else:
        self.print_('(', ',    '.join(params), '):')
    if ((len(code.co_consts) > 0) and (code.co_consts[0] != None)):
        self.print_docstring(indent, code.co_consts[0])
    code._tokens = None
    assert (ast == 'stmts')
    all_globals = find_all_globals(ast, set())
    for g in ((all_globals & self.mod_globs) | find_globals(ast, set())):
        self.print_(self.indent, 'global    ', g)
    self.mod_globs -= all_globals
    rn = (('None' in code.co_names) and (not find_none(ast)))
    self.gen_source(ast, code._customize, isLambda=isLambda, returnNone=rn)
    code._tokens = None
    code._customize = None
