def refactor_step(self, old_text, new_text, move_param_from_idx):
diffs = []<EOL>step, func = self._find_step_node(old_text)<EOL>if step is None:<EOL><INDENT>return diffs<EOL><DEDENT>step_diff = self._refactor_step_text(step, old_text, new_text)<EOL>diffs.append(step_diff)<EOL>params_list_node = func.children[<NUM_LIT:2>]<EOL>moved_params = self._move_param_nodes(<EOL>params_list_node.children, move_param_from_idx)<EOL>if params_list_node.children is not moved_params:<EOL><INDENT>params_span = self._span_from_pos(<EOL>params_list_node.children[<NUM_LIT:0>].end_pos,<EOL>params_list_node.children[-<NUM_LIT:1>].start_pos)<EOL>params_list_node.children = moved_params<EOL>param_code = '<STR_LIT>'.join(p.get_code() for p in moved_params[<NUM_LIT:1>:-<NUM_LIT:1>])<EOL>diffs.append((params_span, param_code))<EOL><DEDENT>return diffs<EOL>
Find the step with old_text and change it to new_text.The step function
parameters are also changed according to move_param_from_idx.
Each entry in this list should specify parameter position from old.