class_docstr: Wrapper thats adds adversarial regularization to a given `tf.keras.Model`.
  
  This model will reuse the layers and variables as the given `base_model`, so
  training this model will also update the variables in the `base_model`. The
  adversarial regularization can be configured by `adv_config`. (See
  `nsl.configs.AdvRegConfig` for the hyperparameters.) The regularization term
  will be added into training objective, and will be minimized during training
  together with other losses specified in `compile()`.
  
  This model expects its input to be a dictionary mapping feature names to
  feature values. The dictionary should contain both input data (`x`) and target
  data (`y`). The feature names of the target data should be passed to this
  model's constructor in `label_keys`, so the model can distinguish between
  input data and target data. If your samples are weighted, the sample weight
  should also be a feature in the dictionary, and its name should be passed to
  the constructor in `sample_weight_key`. When calling this model's `fit()` or
  `evaluate()` method, the argument `y` should not be set because the target
  data is already in the input dictionary. The dictionary format also implies
  that the input has to be named, i.e. the `name` argument of `tf.keras.Input()`
  should be set.
  
  Example:
  
  ```python
  # A linear regression model (for demonstrating the usage only)
  base_model = tf.keras.Sequential([
      tf.keras.Input(shape=(2,), name='input'),
      tf.keras.layers.Dense(1),
  ])
  
  # Applies the wrapper, with 0.2 as regularization weight.
  adv_config = nsl.configs.make_adv_reg_config(multiplier=0.2)
  adv_model = nsl.keras.AdversarialRegularization(base_model,
                                                  label_keys=['label'],
                                                  adv_config=adv_config)
  
  # Compiles the model as usual.
  adv_model.compile(optimizer='adam', loss='mean_squared_error')
  
  # Trains the model. (The actual training data is omitted for clarity.)
  # The model minimizes (mean_squared_error + 0.2 * adversarial_regularization).
  adv_model.fit(x={'input': x_train, 'label': y_train}, batch_size=32)
  ```
  
  It is recommended to use `tf.data.Dataset` to handle the dictionary format
  requirement of the input, especially when using the `validation_data` argument
  in `fit()`.
  
  ```python
  train_data = tf.data.Dataset.from_tensor_slices(
      {'input': x_train, 'label': y_train}).batch(batch_size)
  val_data = tf.data.Dataset.from_tensor_slices(
      {'input': x_val, 'label': y_val}).batch(batch_size)
  val_steps = x_val.shape[0] / batch_size
  adv_model.fit(train_data, validation_data=val_data,
                validation_steps=val_steps, epochs=2, verbose=1)
  ```
code: def _call_base_model(self, inputs, **kwargs):
      base_input_names = getattr(self.base_model, "input_names", None)
      if (
          isinstance(self.base_model, tf.keras.Sequential)
          and base_input_names is not None
          and not set(base_input_names) & set(inputs.keys())
      ):
          # In some cases, Sequential models are automatically compiled to graph
          # networks with automatically generated input names. In this case, the
          # user isn't expected to know those names, so we just flatten the inputs.
          # But the input names are sometimes meaningful (e.g. explicitly set in
          # `tf.keras.Input`). We check if there is any intersection between the
          # user-provided names and model's input names. If there is, we assume the
          # names are meaningful and do name-based lookup in the next branch. There
          # are also cases that Sequential models aren't automatically compiled
          # (e.g. with a DenseFeatures layer). In this case, we don't do any
          # flattening or lookup, but rely on the _base_with_labels_in_features flag
          # to indicate the correct set of features for the base model.
          inputs = tf.nest.flatten(
              self._remove_labels_and_weights(inputs)
          )
      elif (
          self.base_model._is_graph_network
      ):  # pylint: disable=protected-access
          if base_input_names:
              # Converts input dictionary to a list so it conforms with the model's
              # expected input.
              inputs = [inputs[name] for name in base_input_names]
      elif not self._base_with_labels_in_features:
          # Removes labels and sample weights from the input dictionary, since they
          # are only used in this class and base model does not need them as inputs.
          inputs = self._remove_labels_and_weights(inputs)
      return self.base_model(inputs, **kwargs)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import functools
  import types
  import attr
  import neural_structured_learning.configs
  from neural_structured_learning.lib import adversarial_neighbor
  import six
  import tensorflow
label_desc: Use image node_id 11 for calling the AdversarialRegularization obj's underlying member method code with example usage: obj._call_base_model(inputs) and returns: self