def METHOD_NAME(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