code: def apply_adversarial_regularization(model, hparams):
      adv_config = nsl.configs.make_adv_reg_config(
          multiplier=hparams.adv_multiplier,
          adv_step_size=hparams.adv_step_size,
          adv_grad_norm=hparams.adv_grad_norm,
      )
      return nsl.keras.AdversarialRegularization(
          model, label_keys=[LABEL_INPUT_NAME], adv_config=adv_config
      )
  
file_path: neural-structured-learning/neural_structured_learning/examples/adv_keras_cnn_mnist.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl import app
  from absl import flags
  import attr
  import neural_structured_learning
  import tensorflow
label_desc: Use image node_id 5 for calling a global function with example usage: apply_adversarial_regularization(model, hparams) and returns: nsl