nodes: 0, module; 1, function_definition; 2, function_name:merge_paths; 3, parameters; 4, block; 5, identifier:paths; 6, default_parameter; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, return_statement; 11, identifier:weights; 12, None; 13, comment:"""
      Zip together sorted lists.
  
      >>> paths = [[1, 2, 3], [1, 3, 4], [2, 4, 5]]
      >>> G = merge_paths(paths)
      >>> nx.topological_sort(G)
      [1, 2, 3, 4, 5]
      >>> paths = [[1, 2, 3, 4], [1, 2, 3, 2, 4]]
      >>> G = merge_paths(paths, weights=(1, 2))
      >>> nx.topological_sort(G)
      [1, 2, 3, 4]
      """; 14, assignment; 15, assignment; 16, identifier:G; 17, identifier:G; 18, call; 19, identifier:G; 20, call; 21, identifier:make_paths; 22, argument_list; 23, identifier:reduce_paths; 24, argument_list; 25, identifier:paths; 26, keyword_argument; 27, identifier:G; 28, identifier:weights; 29, identifier:weights
code: def merge_paths(paths, weights=None):
      """
      Zip together sorted lists.
  
      >>> paths = [[1, 2, 3], [1, 3, 4], [2, 4, 5]]
      >>> G = merge_paths(paths)
      >>> nx.topological_sort(G)
      [1, 2, 3, 4, 5]
      >>> paths = [[1, 2, 3, 4], [1, 2, 3, 2, 4]]
      >>> G = merge_paths(paths, weights=(1, 2))
      >>> nx.topological_sort(G)
      [1, 2, 3, 4]
      """
      G = make_paths(paths, weights=weights)
      G = reduce_paths(G)
      return G