code: def test_partial_shape(self):
      @def_function.function
      def my_func(x):
          indices = [[0, 2]]
          values = [1]
          y = ops.convert_to_tensor(3, dtype=dtypes.int64)
          dense_shape = [x, y]
          sp = sparse_tensor.SparseTensor(indices, values, dense_shape)
          self.assertEqual(sp.shape.as_list(), [None, 3])
          return sp
  
      my_func.get_concrete_function(
          x=tensor_lib.TensorSpec(dtype=dtypes.int64, shape=[])
      )
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.core.framework import full_type_pb2
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.framework.type_utils import fulltypes_for_flat_tensors
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import sparse_ops
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 3 for calling the SparseTensorShapeTest obj's underlying member method code with example usage: obj.test_partial_shape() and returns: sp