class_docstr: BoltOn Optimizer tests.
class_docstr_tok: ["BoltOn","Optimizer","tests","."]
docstr: Test function is not rerouted.
  
  Test that a fn that should not be rerouted to the internal optimizer is
  in fact not rerouted.
  
  Args:
    fn: fn to test
    args: arguments to that fn
docstr_tok: ["Test","function","is","not","rerouted",".","Test","that","a","fn","that","should","not","be","rerouted","to","the","internal","optimizer","is","in","fact","not","rerouted",".","Args",":","fn",":","fn","to","test","args",":","arguments","to","that","fn"]
code: def test_not_reroute_fn(self, fn, args):
      """Test function is not rerouted.
  
      Test that a fn that should not be rerouted to the internal optimizer is
      in fact not rerouted.
  
      Args:
        fn: fn to test
        args: arguments to that fn
      """
  
      def test_run(fn, args):
          loss = TestLoss(1, 1, 1)
          bolton = opt.BoltOn(TestOptimizer(), loss)
          model = TestModel(1, (1,), 1)
          model.compile(bolton, loss)
          model.layers[0].kernel = model.layers[0].kernel_initializer(
              (model.layer_input_shape[0], model.n_outputs)
          )
          bolton._is_init = True  # pylint: disable=protected-access
          bolton.noise_distribution = "laplace"
          bolton.epsilon = 1
          bolton.layers = model.layers
          bolton.class_weights = 1
          bolton.n_samples = 1
          bolton.batch_size = 1
          bolton.n_outputs = 1
          res = getattr(bolton, fn, lambda: "test")(*args)
          if res != "test":
              res = 1
          else:
              res = 0
          return _ops.convert_to_tensor_v2(res, dtype=tf.float32)
  
      self.assertNotEqual(test_run(fn, args), 0)
  
imports: import unittest
  from absl.testing import parameterized
  import tensorflow.compat.v1
  from tensorflow.compat.v1.python import ops
  from tensorflow.compat.v1.python.framework import test_util
  from tensorflow.compat.v1.python.keras import keras_parameterized
  from tensorflow.compat.v1.python.keras import losses
  from tensorflow.compat.v1.python.keras.initializers import constant
  from tensorflow.compat.v1.python.keras.models import Model
  from tensorflow.compat.v1.python.keras.optimizer_v2.optimizer_v2 import OptimizerV2
  from tensorflow.compat.v1.python.keras.regularizers import L1L2
  from tensorflow.compat.v1.python.platform import test
  from tensorflow_privacy.privacy.bolt_on import optimizers
  from tensorflow_privacy.privacy.bolt_on.losses import StrongConvexMixin
label_desc: Use image node_id 7 for calling the BoltonOptimizerTest obj's underlying member method code with example usage: obj.test_not_reroute_fn(fn, args) and returns: _ops