code: def test_train_with_2_inputs(self, name1, name2):
      x1, x2 = np.array([[1.0]]), np.array([[4.0, 5.0]])
      w1, w2 = np.array([[2.0]]), np.array([[3.0], [6.0]])
      y = np.array([0.0])
      inputs = {name1: x1, name2: x2, "label": y}
      lr, adv_step_size = 0.001, 0.1
  
      input1 = tf.keras.Input(shape=(1,), name=name1)
      input2 = tf.keras.Input(shape=(2,), name=name2)
      dense1 = tf.keras.layers.Dense(
          w1.shape[-1],
          use_bias=False,
          kernel_initializer=tf.keras.initializers.Constant(w1),
      )
      dense2 = tf.keras.layers.Dense(
          w2.shape[-1],
          use_bias=False,
          kernel_initializer=tf.keras.initializers.Constant(w2),
      )
      output = tf.keras.layers.Add()([dense1(input1), dense2(input2)])
      model = tf.keras.Model(inputs=[input1, input2], outputs=output)
  
      adv_config = configs.make_adv_reg_config(
          multiplier=1.0,
          adv_step_size=adv_step_size,
          adv_grad_norm="l2",
      )
      adv_model = adversarial_regularization.AdversarialRegularization(
          model, label_keys=["label"], adv_config=adv_config
      )
      adv_model.compile(
          optimizer=tf.keras.optimizers.SGD(lr), loss="MAE"
      )
      adv_model.fit(x=inputs, batch_size=1, steps_per_epoch=1)
  
      # loss = |x1 * w1 + x2 * w2|, gradient(loss, [x1, x2]) = [w1, w2]
      w_norm = np.sqrt((np.sum(w1 * w1) + np.sum(w2 * w2)))
      x1_adv, x2_adv = (
          x1 + adv_step_size * w1.T / w_norm,
          x2 + adv_step_size * w2.T / w_norm,
      )
      # gradient(loss, [w1, w2]) = [x1, x2]
      w1_new, w2_new = (
          w1 - lr * (x1 + x1_adv).T,
          w2 - lr * (x2 + x2_adv).T,
      )
      self.assertAllClose(
          w1_new, tf.keras.backend.get_value(dense1.weights[0])
      )
      self.assertAllClose(
          w2_new, tf.keras.backend.get_value(dense2.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 13 for calling the AdversarialRegularizationTest obj's underlying member method code with example usage: obj.test_train_with_2_inputs(name1, name2) without return types