code: def snapshot(self):
      snapshot = Snapshot()
      self.all_snapshots.append(weakref.ref(snapshot))
      return snapshot
  
imports: import collections
  import functools
  import timeit
  import traceback
  import weakref
  from json import dumps
  from typing import List
  import numpy
  from .ascii_table import ascii_table
label_desc: Use image node_id 2 for calling the HierarchicalTimer obj's underlying member method code with example usage: obj.snapshot() and returns: snapshot