code: def delete_node_nto1(node_list, begin, node, end):  # type: ([],LinkedNode, LinkedNode, LinkedNode)->[]
          
          if begin is None:
              assert node is not None
              begin = node.precedence
          elif not isinstance(begin, list):
              begin = [begin]
  
          if end.in_or_out:
              # if the end is output node, the output name will be kept to avoid the model output name updating.
              for nb_ in begin:
                  nb_.out_redirect(node.single_input, node.single_output)
          else:
              for nb_ in begin:
                  target_var_name = node.single_input
                  assert target_var_name in nb_.output.values()  # since the output info never be updated, except the final.
                  end.in_redirect(node.single_output, target_var_name)
  
          for nb_ in begin:
              nb_.successor = [end if v_ == node else v_ for v_ in nb_.successor]
          end.precedence = [v_ for v_ in end.precedence if v_ != node] + node.precedence
  
          node_list.remove(node)
          return node_list
docs: delete the node which has n-input and 1-output