code: def test_bad_tensor_shapes(self):
      # All inputs must be 2D.
      with self.assertRaisesRegex(
          (errors.InvalidArgumentError, ValueError),
          "Expected D2 of index to be 2",
      ):
          st = sparse_tensor.SparseTensor(
              [[0]], [0], [10]
          )  # 1D SparseTensor
          self.evaluate(sparse_ops.sparse_cross([st]))
  
      with self.assertRaisesRegex(
          (errors.InvalidArgumentError, ValueError),
          "Dense inputs should be a matrix",
      ):
          dt = array_ops.zeros([0])  # 1D DenseTensor.
          self.evaluate(sparse_ops.sparse_cross([dt]))
  
imports: import numpy
  from tensorflow.python.client import session
  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 gen_sparse_ops
  from tensorflow.python.ops import sparse_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 23 for calling the SparseCrossOpTest obj's underlying member method code with example usage: obj.test_bad_tensor_shapes() without return types