def leave_functiondef(self, node):
if node.type_comment_returns:<EOL><INDENT>self._store_type_annotation_node(node.type_comment_returns)<EOL><DEDENT>if node.type_comment_args:<EOL><INDENT>for argument_annotation in node.type_comment_args:<EOL><INDENT>self._store_type_annotation_node(argument_annotation)<EOL><DEDENT><DEDENT>not_consumed = self._to_consume.pop().to_consume<EOL>if not (<EOL>self.linter.is_message_enabled("<STR_LIT>")<EOL>or self.linter.is_message_enabled("<STR_LIT>")<EOL>or self.linter.is_message_enabled("<STR_LIT>")<EOL>):<EOL><INDENT>return<EOL><DEDENT>if utils.is_error(node):<EOL><INDENT>return<EOL><DEDENT>is_method = node.is_method()<EOL>if is_method and node.is_abstract():<EOL><INDENT>return<EOL><DEDENT>global_names = _flattened_scope_names(node.nodes_of_class(astroid.Global))<EOL>nonlocal_names = _flattened_scope_names(node.nodes_of_class(astroid.Nonlocal))<EOL>for name, stmts in not_consumed.items():<EOL><INDENT>self._check_is_unused(name, node, stmts[<NUM_LIT:0>], global_names, nonlocal_names)<EOL><DEDENT>
leave function: check function's locals are consumed