code: def call_gen_adv_neighbor_with_tf_function(x, loss_fn, adv_config):
      @tf.function
      def gen_adv_neighbor(x):
          loss = loss_fn(x)
          adv_neighbor, _ = adv_lib.gen_adv_neighbor(
              x, loss, adv_config
          )
          return adv_neighbor
  
      return gen_adv_neighbor(x)
  
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 2 for calling a global function with example usage: call_gen_adv_neighbor_with_tf_function(x, loss_fn, adv_config) and returns: gen_adv_neighbor, adv_neighbor