class_docstr: Helper class to create tensorboard summaries for the clustering progress.
  
  This class is derived from tf.keras.callbacks.TensorBoard and just adds
  functionality to write histograms with batch-wise frequency.
  
  Arguments:
      log_dir: The path to the directory where the log files are saved
      cluster_update_freq: determines the frequency of updates of the
        clustering histograms. Same behaviour as parameter update_freq of the
        base class, i.e. it accepts `'batch'`, `'epoch'` or integer.
code: def _write_summary(self):
      with self.writer.as_default():
          for layer in self.model.layers:
              if not hasattr(layer, "layer") or not hasattr(
                  layer.layer, "get_clusterable_weights"
              ):
                  continue  # skip layer
              clusterable_weights = (
                  layer.layer.get_clusterable_weights()
              )
              if len(clusterable_weights) < 1:
                  continue  # skip layers without clusterable weights
              prefix = "clustering/"
              # Log variables
              for var in layer.variables:
                  success = tf.summary.histogram(
                      prefix + var.name, var, step=self.continuous_batch
                  )
                  assert success
  
file_path: model-optimization/tensorflow_model_optimization/python/core/clustering/keras/clustering_callbacks.py
imports: import tensorflow
  from tensorflow_model_optimization.python.core.keras import compat
label_desc: Use image node_id 5 for calling the ClusteringSummaries obj's underlying member method code with example usage: obj._write_summary() without return types