parameters: (result_names, nodes_name, output2node, stats_layout, stat_aliases)
docstring: Change node name in stast to result name if in the original model the subgraph had 1 output,
      but after adding outputs in the subgraph, the number of output ports increased.
      For such nodes, it is necessary to add a '.0' to the original output name
      :param: result_names: names of Result nodes
      :param: nodes_name: node name in graph
      :param: output2node: a dict storing the matching of the result to the node
      :param: stats_layout: dict of stats collection functions
      :param: stat_aliases: dict of algorithms collections stats
docstring_summary: Change node name in stast to result name if in the original model the subgraph had 1 output,
      but after adding outputs in the subgraph, the number of output ports increased.
      For such nodes, it is necessary to add a '.0' to the original output name
      :param: result_names: names of Result nodes
      :param: nodes_name: node name in graph
      :param: output2node: a dict storing the matching of the result to the node
      :param: stats_layout: dict of stats collection functions
      :param: stat_aliases: dict of algorithms collections stats
docstring_tokens: Change node name in stast to result name if in the original model the subgraph had 1 output but after adding outputs in the subgraph the number of output ports increased . For such nodes it is necessary to add a . 0 to the original output name : param : result_names : names of Result nodes : param : nodes_name : node name in graph : param : output2node : a dict storing the matching of the result to the node : param : stats_layout : dict of stats collection functions : param : stat_aliases : dict of algorithms collections stats
function: def align_stat_names_with_results(result_names, nodes_name, output2node, stats_layout, stat_aliases):
      """ Change node name in stast to result name if in the original model the subgraph had 1 output,
      but after adding outputs in the subgraph, the number of output ports increased.
      For such nodes, it is necessary to add a '.0' to the original output name
      :param: result_names: names of Result nodes
      :param: nodes_name: node name in graph
      :param: output2node: a dict storing the matching of the result to the node
      :param: stats_layout: dict of stats collection functions
      :param: stat_aliases: dict of algorithms collections stats
      """
      if output2node:
          for original_out_name in nodes_name:
              if original_out_name not in result_names and (original_out_name, 0) not in stats_layout:
                  out_name_with_port = original_out_name + '.0'
                  assert out_name_with_port in result_names
                  update_stats(stats_layout, stat_aliases, original_out_name, out_name_with_port)
                  output2node[out_name_with_port] = original_out_name
function_tokens: def align_stat_names_with_results ( result_names , nodes_name , output2node , stats_layout , stat_aliases ) : if output2node : for original_out_name in nodes_name : if original_out_name not in result_names and ( original_out_name , 0 ) not in stats_layout : out_name_with_port = original_out_name + '.0' assert out_name_with_port in result_names update_stats ( stats_layout , stat_aliases , original_out_name , out_name_with_port ) output2node [ out_name_with_port ] = original_out_name