code: def testRankTooLarge(self):
      for dtype in np.float16, np.float32:
          np_features = np.array(
              [[[1.0, 1.0, 1.0, 1.0]], [[1.0, 2.0, 3.0, 4.0]]]
          ).astype(dtype)
          np_labels = np.array(
              [[[0.0, 0.0, 0.0, 1.0]], [[0.0, 0.5, 0.5, 0.0]]]
          ).astype(dtype)
          self.assertRaisesRegex(
              ValueError,
              "rank 2, but is rank 3",
              gen_nn_ops.softmax_cross_entropy_with_logits,
              np_features,
              np_labels,
          )
  
imports: import itertools
  import sys
  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 ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.kernel_tests.nn_ops import xent_op_test_base
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_nn_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the XentOpTest obj's underlying member method code with example usage: obj.testRankTooLarge() without return types