def _visit_functiondef(self, cls, node, parent):
self._global_names.append({})<EOL>node, doc = self._get_doc(node)<EOL>newnode = cls(node.name, doc, node.lineno, node.col_offset, parent)<EOL>if node.decorator_list:<EOL><INDENT>decorators = self.visit_decorators(node, newnode)<EOL><DEDENT>else:<EOL><INDENT>decorators = None<EOL><DEDENT>if PY3 and node.returns:<EOL><INDENT>returns = self.visit(node.returns, newnode)<EOL><DEDENT>else:<EOL><INDENT>returns = None<EOL><DEDENT>type_comment_args = type_comment_returns = None<EOL>type_comment_annotation = self.check_function_type_comment(node)<EOL>if type_comment_annotation:<EOL><INDENT>type_comment_returns, type_comment_args = type_comment_annotation<EOL><DEDENT>newnode.postinit(<EOL>args=self.visit(node.args, newnode),<EOL>body=[self.visit(child, newnode) for child in node.body],<EOL>decorators=decorators,<EOL>returns=returns,<EOL>type_comment_returns=type_comment_returns,<EOL>type_comment_args=type_comment_args,<EOL>)<EOL>self._global_names.pop()<EOL>return newnode<EOL>
visit an FunctionDef node to become astroid