def METHOD_NAME(self, meta_graph_def, global_step=None):
    if isinstance(meta_graph_def, meta_graph_pb2.MetaGraphDef):
        tf_meta_graph_def = tf.compat.v1.MetaGraphDef.FromString(
            meta_graph_def.SerializeToString()
        )
    else:
        tf_meta_graph_def = meta_graph_def
    super().METHOD_NAME(
        meta_graph_def=tf_meta_graph_def, global_step=global_step
    )