code: def test_gen_adv_neighbor_with_random_init(self, gen_adv_neighbor_fn):
      feature = np.array([[0.0, 100.0, 200.0, 300.0]])
      label = np.array([0.0])
      weights = np.array([[-1.0], [2.0], [0.1], [-0.7]])
      epsilon = 10.0
  
      model_fn = lambda x: tf.linalg.matmul(x, tf.constant(weights))
      loss_fn = lambda label, prediction: prediction - label
      adv_config = configs.AdvNeighborConfig(
          feature_mask=None,
          adv_step_size=1.0,
          adv_grad_norm="l2",
          pgd_iterations=0,  # So only random initialization moves the feature.
          pgd_epsilon=epsilon,
          random_init=True,
      )
      adv_neighbor = gen_adv_neighbor_fn(
          tf.constant(feature),
          tf.constant(label),
          model_fn,
          loss_fn,
          adv_config,
      )
      actual_neighbor = self.evaluate(adv_neighbor)
      self.assertNotAllEqual(feature, actual_neighbor)
      self.assertLessEqual(
          np.linalg.norm(feature - actual_neighbor, ord=2), epsilon
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import neural_structured_learning.configs
  from neural_structured_learning.lib import adversarial_neighbor
  import numpy
  import tensorflow
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 52 for calling the GenAdvNeighborTest obj's underlying member method code with example usage: obj.test_gen_adv_neighbor_with_random_init(gen_adv_neighbor_fn) without return types