code: def save_to_proto(self, filename):
      proto_str = self.IR_graph.SerializeToString()
      with open(filename, "wb") as of:
          of.write(proto_str)
  
      print("IR network structure is saved as [{}].".format(filename))
  
      return proto_str
  
file_path: MMdnn/mmdnn/conversion/common/DataStructure/parser.py
imports: import numpy
  import mmdnn.conversion.common.IR.graph_pb2
  from mmdnn.conversion.common.IR.graph_pb2 import NodeDef, GraphDef, DataType
label_desc: Use image node_id 8 for calling the Parser obj's underlying member method code with example usage: obj.save_to_proto(filename) and returns: proto_str