code: def test_bad_args(self):
      def minus(a, b):
          return a - b
  
      # No Tout
      with self.assertRaisesRegex(TypeError, r"Missing.*Tout"):
  
          @script_ops.eager_py_func
          def plus1(a, b):
              return a + b
  
      # Forgot to set arg-name
      with self.assertRaisesRegex(TypeError, r"Missing.*Tout"):
  
          @script_ops.eager_py_func(dtypes.int32)
          def plus2(a, b):
              return a + b
  
      # inputs in the decoration doesn't make sense
      with self.assertRaisesRegex(TypeError, r"Don't.*inp.*decorator"):
  
          @script_ops.eager_py_func(inp=[], Tout=dtypes.int32)
          def plus3(a, b):
              return a + b
  
      # Forgot to set the function is still a type-error.
      with self.assertRaisesRegex(TypeError, r"Don't.*inp.*decorator"):
          script_ops.eager_py_func(inp=[], Tout=dtypes.int32)
  
      # Still an error to call without inp
      with self.assertRaisesRegex(TypeError, r"Missing.*inp"):
          script_ops.eager_py_func(minus, Tout=dtypes.int32)
  
      # Why would you do this?
      with self.assertRaisesRegex(TypeError, r"Missing.*inp"):
  
          @script_ops.eager_py_func(func=minus, Tout=dtypes.int32)
          def plus4(a, b):
              return a + b
  
imports: from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import gen_script_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import script_ops
  from tensorflow.python.ops.script_ops import numpy_function
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling the ArgsAndDecoratorsTest obj's underlying member method code with example usage: obj.test_bad_args() and returns: unknown, unknown, unknown, unknown, unknown