code: def make_frozen_stats_tree(stats):
      
      tree, stats_tree = [], [(None, stats)]
      for x in itertools.count():
          try:
              parent_offset, _stats = stats_tree[x]
          except IndexError:
              break
          stats_tree.extend((x, s) for s in _stats)
          members = (_stats.name, _stats.filename, _stats.lineno,
                     _stats.module, _stats.own_hits, _stats.deep_time)
          tree.append((parent_offset, members))
      return tree
docs: Makes a flat members tree of the given statistics.  The statistics can
      be restored by :func:`frozen_stats_from_tree`.