code: def testUnknownRankError(self):
      if context.executing_eagerly():
          return
      partitions = array_ops.placeholder(dtypes.int32, None)
      with self.assertRaisesRegex(
          (ValueError, errors.InvalidArgumentError),
          "partitions must have known rank",
      ):
          ragged_array_ops.stack_dynamic_partitions(
              ["a", "b", "c"], partitions, 10
          )
  
file_path: tensorflow/tensorflow/python/ops/ragged/ragged_dynamic_partition_op_test.py
imports: from absl.testing import parameterized
  from tensorflow.python.eager import context
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import data_flow_ops
  from tensorflow.python.ops.ragged import ragged_array_ops
  from tensorflow.python.ops.ragged import ragged_concat_ops
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 4 for calling the RaggedSegmentStackOpTest obj's underlying member method code with example usage: obj.testUnknownRankError() without return types