code: def run_custom_and_py_ops(request):
      previous_is_custom_kernel_disabled = (
          options.is_custom_kernel_disabled()
      )
      if request.param == "custom_ops":
          options.enable_custom_kernel()
      elif request.param == "py_ops":
          options.disable_custom_kernel()
  
      def _restore_py_ops_value():
          if previous_is_custom_kernel_disabled:
              options.disable_custom_kernel()
          else:
              options.enable_custom_kernel()
  
      request.addfinalizer(_restore_py_ops_value)
  
imports: import os
  import random
  import inspect
  import numpy
  import pytest
  import tensorflow
  from tensorflow_addons import options
  from tensorflow_addons.utils import resource_loader
  from tensorflow_addons.utils.tf_test_utils import layer_test
label_desc: Use image node_id 6 for calling a global function with example usage: run_custom_and_py_ops(request) without return types