<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def process_function(self, call_node, definition):
 """Processes a user defined function when it is called. Increments self.function_call_index each time it is called, we can refer to it as N in the comments. Make e.g. save_N_LHS = assignment.LHS for each AssignmentNode. (save_local_scope) Create e.g. temp_N_def_arg1 = call_arg1_label_visitor.result for each argument. Visit the arguments if they're calls. (save_def_args_in_temp) Create e.g. def_arg1 = temp_N_def_arg1 for each argument. (create_local_scope_from_def_args) Visit and get function nodes. (visit_and_get_function_nodes) Loop through each save_N_LHS node and create an e.g. foo = save_1_foo or, if foo was a call arg, foo = arg_mapping[foo]. (restore_saved_local_scope) Create e.g. ~call_1 = ret_func_foo RestoreNode. (return_handler) Notes: Page 31 in the original thesis, but changed a little. We don't have to return the ~call_1 = ret_func_foo RestoreNode made in return_handler, because it's the last node anyway, that we return in this function. e.g. ret_func_foo gets assigned to visit_Return. Args: call_node(ast.Call) : The node that calls the definition. definition(LocalModuleDefinition):
 Definition of the function being called. Returns: Last node in self.nodes, probably the return of the function appended to self.nodes in return_handler. """

        self.function_call_index += 1
        saved_function_call_index = self.function_call_index

        def_node = definition.node

        saved_variables, first_node = self.save_local_scope(
            def_node.lineno,
            saved_function_call_index
        )

        args_mapping, first_node = self.save_def_args_in_temp(
            call_node.args,
            Arguments(def_node.args),
            call_node.lineno,
            saved_function_call_index,
            first_node
        )
        self.filenames.append(definition.path)
        self.create_local_scope_from_def_args(
            call_node.args,
            Arguments(def_node.args),
            def_node.lineno,
            saved_function_call_index
        )
        function_nodes, first_node = self.visit_and_get_function_nodes(
            definition,
            first_node
        )
        self.filenames.pop()  # Should really probably move after restore_saved_local_scope!!!
        self.restore_saved_local_scope(
            saved_variables,
            args_mapping,
            def_node.lineno
        )
        self.return_handler(
            call_node,
            function_nodes,
            saved_function_call_index,
            first_node
        )
        self.function_return_stack.pop()
        self.function_definition_stack.pop()

        return self.nodes[-1]