message: add a test for tf.function and namescope decorator together
diff: @@ -56,6 +56,7 @@ from tensorflow.python.framework import test_ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.framework import type_spec
  from tensorflow.python.layers import convolutional
  +from tensorflow.python.module import module
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import check_ops
  from tensorflow.python.ops import clip_ops
  @@ -4220,6 +4221,25 @@ class FunctionTest(test.TestCase, parameterized.TestCase):
  enabled(1, 2, 3, 4, kwonly=5, kwarg1=600, kwarg2=700) # No retrace
  self.assertEqual(trace_count[0], 4)
  + def testWithModuleNameScope(self):
  + self.skipTest('b/166158748:function does not handle this case correctly.')
  +
  + class Foo(module.Module):
  +
  + def __init__(self):
  + super().__init__()
  + self.var = None
  +
  + @def_function.function
  + @module.Module.with_name_scope
  + def bar(self, x, y):
  + if self.var is None:
  + return x
  +
  + foo = Foo()
  + with self.assertRaisesRegex(TypeError, 'got two values for argument'):
  + foo.bar(2, x=3) # pylint: disable=redundant-keyword-arg
  +
  class MultiDeviceTest(test.TestCase, parameterized.TestCase):
  