(stats_list)
return list(name_map.values())
Merge together Statistics of the same name in the given list.

  Any two Statistics in the list with the same name will be merged into a
  single Statistic using the `merge_from` method.

  Args:
    stats_list: A list of `Statistic` objects.

  Returns:
    A list of merged Statistics. Each name will appear only once.
Merge together Statistics of the same name in the given list.
Merge together Statistics of the same name in the given list .
def merge_statistics(stats_list):
  """Merge together Statistics of the same name in the given list.

  Any two Statistics in the list with the same name will be merged into a
  single Statistic using the `merge_from` method.

  Args:
    stats_list: A list of `Statistic` objects.

  Returns:
    A list of merged Statistics. Each name will appear only once.
  """
  name_map = {}
  for stat in stats_list:
    if stat.name in name_map:
      name_map[stat.name].merge_from(stat)
    else:
      name_map[stat.name] = stat
  return list(name_map.values())
def merge_statistics ( stats_list ) : name_map = { } for stat in stats_list : if stat . name in name_map : name_map [ stat . name ] . merge_from ( stat ) else : name_map [ stat . name ] = stat return list ( name_map . values ( ) )