Returns a summary metadata for the HParams plugin.

  Returns a summary_pb2.SummaryMetadata holding a copy of the given
  HParamsPluginData message in its plugin_data.content field.
  Sets the version field of the hparams_plugin_data_pb copy to
  PLUGIN_DATA_VERSION.

  Args:
    hparams_plugin_data_pb: the HParamsPluginData protobuffer to use.

def create_summary_metadata(hparams_plugin_data_pb):
  """Returns a summary metadata for the HParams plugin.

  Returns a summary_pb2.SummaryMetadata holding a copy of the given
  HParamsPluginData message in its plugin_data.content field.
  Sets the version field of the hparams_plugin_data_pb copy to
  PLUGIN_DATA_VERSION.

  Args:
    hparams_plugin_data_pb: the HParamsPluginData protobuffer to use.
  """
  if not isinstance(hparams_plugin_data_pb, plugin_data_pb2.HParamsPluginData):
    raise TypeError('Needed an instance of plugin_data_pb2.HParamsPluginData.'
                    ' Got: %s' % type(hparams_plugin_data_pb))
  content = plugin_data_pb2.HParamsPluginData()
  content.CopyFrom(hparams_plugin_data_pb)
  content.version = PLUGIN_DATA_VERSION
  return tf.compat.v1.SummaryMetadata(
      plugin_data=tf.compat.v1.SummaryMetadata.PluginData(
          plugin_name=PLUGIN_NAME, content=content.SerializeToString()))