class_docstr: Test cases for keras model fitting.
class_docstr_tok: ["Test","cases","for","keras","model","fitting","."]
docstr: Tests the BOltonModel calculate_class_weights method.
  
  Args:
    class_weights: the class_weights to use
    class_counts: count of number of samples for each class
    num_classes: number of outputs neurons
    result: expected result
code: def test_class_calculate(
      self, class_weights, class_counts, num_classes, result
  ):
      """Tests the BOltonModel calculate_class_weights method.
  
      Args:
        class_weights: the class_weights to use
        class_counts: count of number of samples for each class
        num_classes: number of outputs neurons
        result: expected result
      """
      clf = models.BoltOnModel(1, 1)
      expected = clf.calculate_class_weights(
          class_weights, class_counts, num_classes
      )
  
      if hasattr(expected, "numpy"):
          expected = expected.numpy()
      self.assertAllEqual(expected, result)
  
imports: from absl.testing import parameterized
  import tensorflow.compat.v1
  from tensorflow.compat.v1.python.framework import ops
  from tensorflow.compat.v1.python.keras import keras_parameterized
  from tensorflow.compat.v1.python.keras import losses
  from tensorflow.compat.v1.python.keras.optimizer_v2.optimizer_v2 import OptimizerV2
  from tensorflow.compat.v1.python.keras.regularizers import L1L2
  from tensorflow_privacy.privacy.bolt_on import models
  from tensorflow_privacy.privacy.bolt_on.losses import StrongConvexMixin
  from tensorflow_privacy.privacy.bolt_on.optimizers import BoltOn
label_desc: Use image node_id 4 for calling the FitTests obj's underlying member method code with example usage: obj.test_class_calculate(class_weights, class_counts, num_classes, result) without return types