code: def testGoodPartialSparseTensorRank(self):
      if not context.executing_eagerly():
          st1 = sparse_tensor.SparseTensor(
              indices=[[0, 0]],
              values=[0],
              dense_shape=array_ops.placeholder(dtypes.int64),
          )
          st2 = sparse_tensor.SparseTensor(
              indices=array_ops.placeholder(dtypes.int64),
              values=[0],
              dense_shape=[4, 3],
          )
  
          # Shouldn't throw ValueError
          RaggedTensor.from_sparse(st1)
          RaggedTensor.from_sparse(st2)
  
file_path: tensorflow/tensorflow/python/ops/ragged/ragged_from_sparse_op_test.py
imports: from tensorflow.python.eager import context
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops.ragged.ragged_tensor import RaggedTensor
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 4 for calling the RaggedTensorToSparseOpTest obj's underlying member method code with example usage: obj.testGoodPartialSparseTensorRank() without return types