class_docstr: Rgist Pattern Decorator
class_docstr_tok: ["Rgist","Pattern","Decorator"]
code: def __call__(self, func):
      def local(*args, **kwargs):
          with Session() as sess:
              ret = func(*args, **kwargs)
              # sess.run(tf.compat.v1.global_variables_initializer())
              tf.compat.v1.global_variables_initializer().run()
              graph_summary = GraphSummary(graph_def=sess.graph_def)
              graph_summary.Summary()
              graph_def = graph_util.convert_variables_to_constants(
                  sess, sess.graph_def, graph_summary["outputs"]
              )
              RegistPattern.patterns[self.name].append(graph_def)
          return ret
  
      return local
  
file_path: delta/gcompiler/python/delta_infer/subgraphs/common/generator.py
imports: from __future__ import absolute_import, division, print_function
  import os
  import sys
  import tensorflow
  from tensorflow.python.framework import graph_util
  from tensorflow.compat.v1 import Session
  from .summarize_graph import GraphSummary
label_desc: Use image node_id 4 for calling the RegistPattern obj's underlying member method code with example usage: obj.__call__(func) and returns: local, ret