code: def export_optimization_rate(self):
      before_nodes_size = len(self.graph_def.node)
      after_nodes_size = len(self.op_dict)
      info_dict = {"optimize": {"input": True}}
      doc = "After optimization, the input of the model will be in NHWC format.\n"
      if self.affine_resolved:
          doc += (
              "However, the output of the model is the same as the model before optimization."
              " And the inferred results can be directly compared.\n"
          )
          info_dict["optimize"]["output"] = False
      else:
          doc += (
              "The output of the model should also be in the NHWC format."
              " Compare the inferred results of the model before optimization, it will need to transpose the inferred results.\n"
          )
          info_dict["optimize"]["output"] = True
      doc += "The number of nodes before optimization is {}, after optimization is {}, the optimization rate is {:.2%}.".format(
          before_nodes_size,
          after_nodes_size,
          (before_nodes_size - after_nodes_size) / before_nodes_size,
      )
  
      info_dict["optimize"]["doc"] = doc
      return info_dict
  
imports: import numpy
  import tensorflow.compat.v1
  from tensorflow.core.framework.tensor_pb2 import TensorProto
  from tensorflow.core.framework.tensor_shape_pb2 import TensorShapeProto
label_desc: Use image node_id 19 for calling the RefineGraph obj's underlying member method code with example usage: obj.export_optimization_rate() and returns: info_dict