code: def mesh(
      name,
      vertices,
      faces=None,
      colors=None,
      config_dict=None,
      step=None,
      description=None,
  ):
      """Writes a TensorFlow mesh summary.
  
      Args:
        name: A name for this summary. The summary tag used for TensorBoard will
          be this name prefixed by any active name scopes.
        vertices: Tensor of shape `[dim_1, ..., dim_n, 3]` representing the 3D
          coordinates of vertices.
        faces: Tensor of shape `[dim_1, ..., dim_n, 3]` containing indices of
          vertices within each triangle.
        colors: Tensor of shape `[dim_1, ..., dim_n, 3]` containing colors for each
          vertex.
        config_dict: Dictionary with ThreeJS classes names and configuration.
        step: Explicit `int64`-castable monotonic step value for this summary. If
          omitted, this defaults to `tf.summary.experimental.get_step()`, which must
          not be None.
        description: Optional long-form description for this summary, as a
          constant `str`. Markdown is supported. Defaults to empty.
  
      Returns:
        True if all components of the mesh were saved successfully and False
          otherwise.
      """
      json_config = _get_json_config(config_dict)
  
      # All tensors representing a single mesh will be represented as separate
      # summaries internally. Those summaries will be regrouped on the client before
      # rendering.
      tensors = [
          metadata.MeshTensor(
              vertices,
              plugin_data_pb2.MeshPluginData.VERTEX,
              tf.float32,
          ),
          metadata.MeshTensor(
              faces, plugin_data_pb2.MeshPluginData.FACE, tf.int32
          ),
          metadata.MeshTensor(
              colors, plugin_data_pb2.MeshPluginData.COLOR, tf.uint8
          ),
      ]
      tensors = [
          tensor for tensor in tensors if tensor.data is not None
      ]
  
      components = metadata.get_components_bitmask(
          [tensor.content_type for tensor in tensors]
      )
  
      summary_scope = (
          getattr(tf.summary.experimental, "summary_scope", None)
          or tf.summary.summary_scope
      )
      all_success = True
      with summary_scope(name, "mesh_summary", values=tensors):
          for tensor in tensors:
              all_success = all_success and _write_summary(
                  name,
                  description,
                  tensor.data,
                  tensor.content_type,
                  components,
                  json_config,
                  step,
              )
  
      return all_success
  
file_path: tensorboard/tensorboard/plugins/mesh/summary_v2.py
imports: import json
  from tensorboard.compat import tf2
  from tensorboard.compat.proto import summary_pb2
  from tensorboard.plugins.mesh import metadata
  from tensorboard.plugins.mesh import plugin_data_pb2
  from tensorboard.util import tensor_util
label_desc: Use image node_id 3 for calling a global function with example usage: mesh(name, vertices, faces, colors, config_dict, step, description) and returns: all_success