class_docstr: Abstractly implements the SummaryWriter API.
  
  This API basically implements a number of endpoints (add_summary,
  add_session_log, etc). The endpoints all generate an event protobuf, which is
  passed to the contained event_writer.
docstr: Adds a `MetaGraphDef` to the event file.
  
  The `MetaGraphDef` allows running the given graph via
  `saver.import_meta_graph()`.
  
  Args:
    meta_graph_def: A `MetaGraphDef` object, often as returned by
      `saver.export_meta_graph()`.
    global_step: Number. Optional global step counter to record with the
      graph.
  
  Raises:
    TypeError: If both `meta_graph_def` is not an instance of `MetaGraphDef`.
code: def add_meta_graph(self, meta_graph_def, global_step=None):
      """Adds a `MetaGraphDef` to the event file.
  
      The `MetaGraphDef` allows running the given graph via
      `saver.import_meta_graph()`.
  
      Args:
        meta_graph_def: A `MetaGraphDef` object, often as returned by
          `saver.export_meta_graph()`.
        global_step: Number. Optional global step counter to record with the
          graph.
  
      Raises:
        TypeError: If both `meta_graph_def` is not an instance of `MetaGraphDef`.
      """
      if not isinstance(meta_graph_def, meta_graph_pb2.MetaGraphDef):
          raise TypeError(
              "meta_graph_def must be type MetaGraphDef, saw type: %s"
              % type(meta_graph_def)
          )
      meta_graph_bytes = meta_graph_def.SerializeToString()
      event = event_pb2.Event(meta_graph_def=meta_graph_bytes)
      self._add_event(event, global_step)
  
imports: import os.path
  import time
  import warnings
  from tensorflow.core.framework import graph_pb2
  from tensorflow.core.framework import summary_pb2
  from tensorflow.core.protobuf import meta_graph_pb2
  from tensorflow.core.util import event_pb2
  from tensorflow.python.eager import context
  from tensorflow.python.framework import meta_graph
  from tensorflow.python.framework import ops
  from tensorflow.python.platform import gfile
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.summary import plugin_asset
  from tensorflow.python.summary.writer.event_file_writer import EventFileWriter
  from tensorflow.python.summary.writer.event_file_writer_v2 import EventFileWriterV2
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 7 for calling the SummaryToEventTransformer obj's underlying member method code with example usage: obj.add_meta_graph(meta_graph_def, global_step) without return types