code: def test_adversarial_wrapper_saving_batch_statistics(self):
      x0 = np.array(
          [[0.9, 0.1], [0.2, -0.8], [-0.7, -0.3], [-0.4, 0.6]]
      )
      y0 = np.array([1, 0, 1, 0])
      input_fn = single_batch_input_fn({FEATURE_NAME: x0}, y0)
      fc = tf.feature_column.numeric_column(FEATURE_NAME, shape=[2])
      base_est = tf_estimator.DNNClassifier(
          hidden_units=[4],
          feature_columns=[fc],
          model_dir=self.model_dir,
          activation_fn=lambda x: tf.abs(x) + 0.1,
          dropout=None,
          batch_norm=True,
      )
      adv_est = nsl_estimator.add_adversarial_regularization(
          base_est,
          optimizer_fn=lambda: tf.train.GradientDescentOptimizer(0.005),
      )
  
      adv_est.train(input_fn=input_fn, steps=1)
      moving_mean = adv_est.get_variable_value(
          "dnn/hiddenlayer_0/batchnorm_0/moving_mean"
      )
      moving_variance = adv_est.get_variable_value(
          "dnn/hiddenlayer_0/batchnorm_0/moving_variance"
      )
      # The activation function always returns a positive number, so the batch
      # mean cannot be zero if updated successfully.
      self.assertNotAllClose(moving_mean, np.zeros(moving_mean.shape))
      self.assertNotAllClose(
          moving_variance, np.ones(moving_variance.shape)
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import shutil
  import tempfile
  from absl.testing import parameterized
  import neural_structured_learning.configs
  import neural_structured_learning.estimator
  import numpy
  import tensorflow
  from tensorflow import estimator
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 6 for calling the AdversarialRegularizationTest obj's underlying member method code with example usage: obj.test_adversarial_wrapper_saving_batch_statistics() without return types