code: def test_train_fgsm_with_sample_weights(self, model_fn):
      sample_weight = np.array([[2.0]])
      w, x0, y0, lr, adv_config, w_new = self._set_up_linear_regression(
          sample_weight
      )
  
      inputs = {
          "feature": tf.constant(x0),
          "label": tf.constant(y0),
          "sample_weight": tf.constant(sample_weight),
      }
      model = model_fn(input_shape=(2,), weights=w)
      adv_model = adversarial_regularization.AdversarialRegularization(
          model,
          label_keys=["label"],
          sample_weight_key="sample_weight",
          adv_config=adv_config,
      )
      adv_model.compile(
          optimizer=tf.keras.optimizers.SGD(lr), loss="MSE"
      )
      adv_model.fit(x=inputs, batch_size=1, steps_per_epoch=1)
  
      self.assertAllClose(
          w_new, tf.keras.backend.get_value(model.weights[0])
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import os
  from absl.testing import parameterized
  import neural_structured_learning.configs
  from neural_structured_learning.keras import adversarial_regularization
  import numpy
  import tensorflow
  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_train_fgsm_with_sample_weights(model_fn) without return types