code: def testLen(self):
      # len can be fixed by autograph.
      # TODO(wangpeng): this test can just be removed
      @tf.function(autograph=False)
      def f(x):
          # Note that shape of input to len is data dependent.
          return len(np.where(x)[0])
  
      t = np.asarray([True, False, True])
      with self.assertRaises(TypeError):
          f(t)
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops.numpy_ops import np_math_ops
label_desc: Use image node_id 2 for calling the FunctionTest obj's underlying member method code with example usage: obj.testLen() and returns: len