class_docstr: Tests for reshaping 0-sized SparseTensors, compared w/ dense tensors.
class_docstr_tok: ["Tests","for","reshaping","0-sized","SparseTensors",",","compared","w\/","dense","tensors","."]
code: def _MakeAndReshapeTensor(
      self, tensor_class, original_shape, target_shape
  ):
      if tensor_class == "sparse":
          ind = np.zeros([0, len(original_shape)]).astype(np.int64)
          val = np.array([]).astype(np.float64)
          shape = np.array(original_shape).astype(np.int64)
          sp_input = sparse_tensor.SparseTensorValue(ind, val, shape)
          sp_output = self.evaluate(
              sparse_ops.sparse_reshape(sp_input, target_shape)
          )
          return sp_output.dense_shape
      else:
          dense_input = array_ops.zeros(original_shape)
          dense_output = self.evaluate(
              array_ops.reshape(dense_input, target_shape)
          )
          return dense_output.shape
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.framework import constant_op
  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 import sparse_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the EmptySparseTensorReshapeTest obj's underlying member method code with example usage: obj._MakeAndReshapeTensor(tensor_class, original_shape, target_shape) and returns: sp_output, dense_output