code: def testUnknownShape(self):
      s = tensor_shape.TensorShape(None)
      # pylint: disable=g-error-prone-assert-raises
      with self.assertRaisesRegex(
          ValueError, "Shape .+ is not fully defined"
      ):
          s.assert_is_fully_defined()
      # pylint: enable=g-error-prone-assert-raises
      self.assertIsNone(s.rank)
      with self.assertRaisesRegex(
          ValueError,
          "Cannot take the length of shape with unknown rank.",
      ):
          len(s)
      self.assertFalse(s)
      self.assertIsNone(s.dims)
      with self.assertRaisesRegex(
          ValueError, "Cannot iterate over a shape with unknown rank."
      ):
          for _ in tensor_shape.TensorShape(None):
              pass
  
imports: from absl.testing import parameterized
  from tensorflow.core.framework import tensor_shape_pb2
  from tensorflow.core.function import trace_type
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 1 for calling the ShapeTest obj's underlying member method code with example usage: obj.testUnknownShape() without return types