code: def create_summary_metadata(
      name,
      display_name,
      content_type,
      components,
      shape,
      description=None,
      json_config=None,
  ):
      """Creates summary metadata which defined at MeshPluginData proto.
  
      Arguments:
        name: Original merged (summaries of different types) summary name.
        display_name: The display name used in TensorBoard.
        content_type: Value from MeshPluginData.ContentType enum describing data.
        components: Bitmask representing present parts (vertices, colors, etc.) that
          belong to the summary.
        shape: list of dimensions sizes of the tensor.
        description: The description to show in TensorBoard.
        json_config: A string, JSON-serialized dictionary of ThreeJS classes
          configuration.
  
      Returns:
        A `summary_pb2.SummaryMetadata` protobuf object.
      """
      # Shape should be at least BxNx3 where B represents the batch dimensions
      # and N - the number of points, each with x,y,z coordinates.
      if len(shape) != 3:
          raise ValueError(
              "Tensor shape should be of shape BxNx3, but got %s."
              % str(shape)
          )
      mesh_plugin_data = plugin_data_pb2.MeshPluginData(
          version=get_current_version(),
          name=name,
          content_type=content_type,
          components=components,
          shape=shape,
          json_config=json_config,
      )
      content = mesh_plugin_data.SerializeToString()
      return summary_pb2.SummaryMetadata(
          display_name=display_name,  # Will not be used in TensorBoard UI.
          summary_description=description,
          plugin_data=summary_pb2.SummaryMetadata.PluginData(
              plugin_name=PLUGIN_NAME, content=content
          ),
      )
  
file_path: tensorboard/tensorboard/plugins/mesh/metadata.py
imports: import dataclasses
  from typing import Any
  from tensorboard.compat.proto import summary_pb2
  from tensorboard.plugins.mesh import plugin_data_pb2
label_desc: Use image node_id 4 for calling a global function with example usage: create_summary_metadata(name, display_name, content_type, components, shape, description, json_config) and returns: summary_pb2