code: def create_opname_scope(layer):
      layer.register_forward_pre_hook(_opname_creation_prehook)
      for name, sublayer in layer.named_children():
          sublayer._full_name = "{}[{}]".format(
              sublayer.__class__.__name__, name
          )
          create_opname_scope(sublayer)
      layer.register_forward_post_hook(_opname_creation_posthook)
  
imports: from collections import Counter
  from collections import deque
label_desc: Use image node_id 4 for calling a global function with example usage: create_opname_scope(layer) without return types