docs: def frozen_stats_from_tree(tree):
      """Restores a statistics from the given flat members tree.
      :func:`make_frozen_stats_tree` makes a tree for this function.
      """
      if not tree:
          raise ValueError('Empty tree')
      stats_index = []
      for parent_offset, members in tree:
          stats = FrozenStatistics(*members)
          stats_index.append(stats)
          if parent_offset is not None:
              stats_index[parent_offset].children.append(stats)
      return stats_index[0]