code: def get_components_bitmask(content_types):
      """Creates bitmask for all existing components of the summary.
  
      Args:
        content_type: list of plugin_data_pb2.MeshPluginData.ContentType,
          representing all components related to the summary.
      Returns: bitmask based on passed tensors.
      """
      components = 0
      for content_type in content_types:
          if content_type == plugin_data_pb2.MeshPluginData.UNDEFINED:
              raise ValueError(
                  "Cannot include UNDEFINED content type in mask."
              )
          components = components | (1 << content_type)
      return components
  
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 1 for calling a global function with example usage: get_components_bitmask(content_types) and returns: components