Returns a summary holding the given HParamsPluginData message.

  Helper function.

  Args:
    tag: string. The tag to use.
    hparams_plugin_data: The HParamsPluginData message to use.

def _summary(tag, hparams_plugin_data):
  """Returns a summary holding the given HParamsPluginData message.

  Helper function.

  Args:
    tag: string. The tag to use.
    hparams_plugin_data: The HParamsPluginData message to use.
  """
  summary = tf.compat.v1.Summary()
  summary.value.add(
      tag=tag,
      metadata=metadata.create_summary_metadata(hparams_plugin_data))
  return summary