code: def parse_plugin_metadata(content):
      """Parse summary metadata to a Python object.
  
      Arguments:
        content: The `content` field of a `SummaryMetadata` proto corresponding to
          the text plugin.
      Returns:
        A `TextPluginData` protobuf object.
      """
      if not isinstance(content, bytes):
          raise TypeError("Content type must be bytes")
      if content == b"{}":
          # Old-style JSON format. Equivalent to an all-default proto.
          return plugin_data_pb2.TextPluginData()
      result = plugin_data_pb2.TextPluginData.FromString(content)
      if result.version == 0:
          return result
      # No other versions known at this time, so no migrations to do.
      return result
  
imports: from tensorboard.compat.proto import summary_pb2
  from tensorboard.plugins.text import plugin_data_pb2
label_desc: Use image node_id 2 for calling a global function with example usage: parse_plugin_metadata(content) and returns: result, plugin_data_pb2, result