code: def test_no_tf_control_dependencies():
      # TODO: remove all elements of the list and remove the allowlist
      # This allowlist should not grow. Do not add elements to this list.
      allowlist = [
          "tensorflow_addons/layers/wrappers.py",
          "tensorflow_addons/image/utils.py",
          "tensorflow_addons/image/dense_image_warp.py",
          "tensorflow_addons/optimizers/average_wrapper.py",
          "tensorflow_addons/optimizers/discriminative_layer_training.py",
          "tensorflow_addons/optimizers/yogi.py",
          "tensorflow_addons/optimizers/lookahead.py",
          "tensorflow_addons/optimizers/weight_decay_optimizers.py",
          "tensorflow_addons/optimizers/rectified_adam.py",
          "tensorflow_addons/optimizers/lamb.py",
          "tensorflow_addons/seq2seq/sampler.py",
          "tensorflow_addons/seq2seq/beam_search_decoder.py",
          "tensorflow_addons/seq2seq/attention_wrapper.py",
      ]
      for file_path, line_idx, line in get_lines_of_source_code(
          allowlist
      ):
          if "tf.control_dependencies(" in line:
              raise NameError(
                  "The usage of a tf.control_dependencies() function call was found in "
                  "file {} at line {}:\n\n"
                  "   {}\n"
                  "In TensorFlow 2.x, in a function decorated "
                  "with `@tf.function` the dependencies are controlled automatically"
                  " thanks to Autograph. \n"
                  "TensorFlow Addons aims to be written with idiomatic TF 2.x code. \n"
                  "As such, using tf.control_dependencies() is not allowed in the codebase. \n"
                  "Decorate your function with @tf.function instead. \n"
                  "You can take a look at \n"
                  "https://github.com/tensorflow/community/blob/master/rfcs/20180918-functions-not-sessions-20.md#program-order-semantics--control-dependencies"
                  "".format(file_path, line_idx, line)
              )
  
file_path: addons/tools/testing/source_code_test.py
imports: import glob
  import os
  from typedapi import ensure_api_is_typed
  import importlib
  import tensorflow_addons
  import tensorflow
label_desc: Use image node_id 8 for calling a global function with example usage: test_no_tf_control_dependencies() without return types