code: def testAsList(self):
      with self.assertRaisesRegex(
          ValueError, "not defined on an unknown TensorShape"
      ):
          tensor_shape.unknown_shape().as_list()
      self.assertAllEqual(
          [None, None], tensor_shape.unknown_shape(2).as_list()
      )
      self.assertAllEqual(
          [2, None, 4], tensor_shape.TensorShape((2, None, 4)).as_list()
      )
  
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 19 for calling the ShapeTest obj's underlying member method code with example usage: obj.testAsList() without return types