code: def _testL2RegularizationWorksCorrectly(self, static_l2):
      n = int(1e3)
      [
          model_matrix,
          response,
          _,  # model_coefficients_true
          _,  # linear_response_true
      ] = self.make_dataset(n=n, d=3, link="probit")
      l2_regularizer = np.array(
          0.07 * n, dtype_util.as_numpy_dtype(model_matrix.dtype)
      )
      if not static_l2:
          l2_regularizer = tf1.placeholder_with_default(
              l2_regularizer, shape=[]
          )
      [
          expected_model_coefficients,
          expected_linear_response,
          expected_is_converged,
          expected_num_iter,
      ] = fisher_scoring.fit(
          model_matrix,
          response,
          family.BernoulliNormalCDF(),
          l2_regularizer=l2_regularizer,
          fast_unsafe_numerics=True,
          maximum_iterations=10,
      )
      [
          actual_model_coefficients,
          actual_linear_response,
          actual_is_converged,
          actual_num_iter,
      ] = fisher_scoring.fit(
          model_matrix,
          response,
          family.BernoulliNormalCDF(),
          l2_regularizer=l2_regularizer,
          fast_unsafe_numerics=False,
          maximum_iterations=10,
      )
  
      [
          expected_model_coefficients_,
          expected_linear_response_,
          expected_is_converged_,
          expected_num_iter_,
          actual_model_coefficients_,
          actual_linear_response_,
          actual_is_converged_,
          actual_num_iter_,
      ] = self.evaluate(
          [
              expected_model_coefficients,
              expected_linear_response,
              expected_is_converged,
              expected_num_iter,
              actual_model_coefficients,
              actual_linear_response,
              actual_is_converged,
              actual_num_iter,
          ]
      )
  
      self.assertAllClose(
          expected_model_coefficients_,
          actual_model_coefficients_,
          atol=1e-6,
          rtol=1e-6,
      )
      self.assertAllClose(
          expected_linear_response_,
          actual_linear_response_,
          atol=1e-5,
          rtol=1e-5,
      )
      self.assertEqual(expected_is_converged_, actual_is_converged_)
      self.assertEqual(expected_num_iter_, actual_num_iter_)
  
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import bernoulli
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import uniform
  from tensorflow_probability.python.glm import family
  from tensorflow_probability.python.glm import fisher_scoring
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 1 for calling the FitTestSlow obj's underlying member method code with example usage: obj._testL2RegularizationWorksCorrectly(static_l2) without return types