code: def _migrate_tagged_run_metadata_event(old_event):
      result = event_pb2.Event()
      result.wall_time = old_event.wall_time
      result.step = old_event.step
      trm = old_event.tagged_run_metadata
      value = result.summary.value.add(tag=trm.tag)
      value.tensor.CopyFrom(
          tensor_util.make_tensor_proto([trm.run_metadata])
      )
      value.metadata.plugin_data.plugin_name = (
          graphs_metadata.PLUGIN_NAME_TAGGED_RUN_METADATA
      )
      # `value.metadata.plugin_data.content` left empty
      value.metadata.data_class = summary_pb2.DATA_CLASS_BLOB_SEQUENCE
      return (result,)
  
imports: from tensorboard.compat.proto import event_pb2
  from tensorboard.compat.proto import summary_pb2
  from tensorboard.plugins.audio import metadata
  from tensorboard.plugins.custom_scalar import metadata
  from tensorboard.plugins.graph import metadata
  from tensorboard.plugins.histogram import metadata
  from tensorboard.plugins.hparams import metadata
  from tensorboard.plugins.image import metadata
  from tensorboard.plugins.mesh import metadata
  from tensorboard.plugins.pr_curve import metadata
  from tensorboard.plugins.scalar import metadata
  from tensorboard.plugins.text import metadata
  from tensorboard.util import tensor_util
label_desc: Use image node_id 3 for calling a global function with example usage: _migrate_tagged_run_metadata_event(old_event) and returns: result