docstr: Runs the op-under-test both forwards and backwards
docstr_tok: ["Runs","the","op-under-test","both","forwards","and","backwards"]
code: def _opFwdBwd(self, labels, logits):
      """Runs the op-under-test both forwards and backwards"""
      logits = ops_lib.convert_to_tensor(
          logits
      )  # needed for the gradient tape
      with backprop_lib.GradientTape() as tape:
          tape.watch(logits)
          loss = nn_ops.sparse_softmax_cross_entropy_with_logits_v2(
              labels=labels, logits=logits
          )
      return loss, tape.gradient(loss, logits)
  
imports: import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager import context
  from tensorflow.python.framework import config
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gradient_checker_v2
  from tensorflow.python.ops import nn_ops
  import tensorflow.python.ops.nn_grad
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the SparseXentOpTestBase obj's underlying member method code with example usage: obj._opFwdBwd(labels, logits) and returns: loss,  tape