code: def make_adv_reg_config(
      multiplier=attr.fields(AdvRegConfig).multiplier.default,
      feature_mask=attr.fields(AdvNeighborConfig).feature_mask.default,
      adv_step_size=attr.fields(
          AdvNeighborConfig
      ).adv_step_size.default,
      adv_grad_norm=attr.fields(
          AdvNeighborConfig
      ).adv_grad_norm.default,
      clip_value_min=attr.fields(
          AdvNeighborConfig
      ).clip_value_min.default,
      clip_value_max=attr.fields(
          AdvNeighborConfig
      ).clip_value_max.default,
      pgd_iterations=attr.fields(
          AdvNeighborConfig
      ).pgd_iterations.default,
      pgd_epsilon=attr.fields(AdvNeighborConfig).pgd_epsilon.default,
      random_init=attr.fields(AdvNeighborConfig).random_init.default,
  ):
      """Creates an `nsl.configs.AdvRegConfig` object.
  
      Args:
        multiplier: multiplier to adversarial regularization loss. Defaults to 0.2.
        feature_mask: mask w/ values in `[0, 1]` applied on the gradient. Its shape
          should be the same as (or broadcastable to) that of the input features.
          If the input features are in a collection (e.g. list or dictionary), this
          field should also be a collection of the same structure. Input features
          corresponding to mask values of 0.0 are *not* perturbed. Setting this
          field to `None` is equivalent to setting a mask value of 1.0 for all input
          features.
        adv_step_size: step size to find the adversarial sample. Defaults to 0.001.
        adv_grad_norm: type of tensor norm to normalize the gradient. Input will be
          converted to `NormType` when applicable (e.g., a value of 'l2' will be
          converted to `nsl.configs.NormType.L2`). Defaults to L2 norm.
        clip_value_min: minimum value to clip the features after perturbation. The
          shape should be the same as (or broadcastable to) input features. If the
          input features are in a collection (e.g. list or dictionary), this field
          should also be a collection with the same structure. An omitted or
          `None`-valued entry in the collection indicates no constraint on the
          corresponding feature.
        clip_value_max: maximum value to clip the feature after perturbation. (See
          `clip_value_min` for the structure and shape limitations.)
        pgd_iterations: number of attack iterations for Projected Gradient Descent
          (PGD) attack. Defaults to 1, which resembles the Fast Gradient Sign Method
          (FGSM) attack.
        pgd_epsilon: radius of the epsilon ball to project back to. Only used in
          Projected Gradient Descent (PGD) attack.
        random_init: Apply a random perturbation before FGSM/PGD steps. Default set
          to `False` for no random initialization being applied.
  
      Returns:
        An `nsl.configs.AdvRegConfig` object.
      """
      return AdvRegConfig(
          multiplier=multiplier,
          adv_neighbor_config=AdvNeighborConfig(
              feature_mask=feature_mask,
              adv_step_size=adv_step_size,
              adv_grad_norm=adv_grad_norm,
              clip_value_min=clip_value_min,
              clip_value_max=clip_value_max,
              pgd_iterations=pgd_iterations,
              pgd_epsilon=pgd_epsilon,
              random_init=random_init,
          ),
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import enum
  import attr
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: make_adv_reg_config(multiplier, feature_mask, adv_step_size, adv_grad_norm, clip_value_min, clip_value_max, pgd_iterations, pgd_epsilon, random_init) and returns: AdvRegConfig