code: def testSparseEye(self):
      def test_one(n, m, as_tensors):
          expected = np.eye(n, m)
          if as_tensors:
              m = constant_op.constant(m)
              n = constant_op.constant(n)
          s = sparse_ops.sparse_eye(n, m)
          d = sparse_ops.sparse_to_dense(
              s.indices, s.dense_shape, s.values
          )
          self.assertAllEqual(self.evaluate(d), expected)
  
      for n in range(2, 10, 2):
          for m in range(2, 10, 2):
              # Test with n and m as both constants and tensors.
              test_one(n, m, True)
              test_one(n, m, False)
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  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 test_util
  from tensorflow.python.ops import array_grad
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_sparse_ops
  from tensorflow.python.ops import gradient_checker_v2
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import sparse_grad
  from tensorflow.python.ops import sparse_ops
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 1 for calling the SparseOpsTest obj's underlying member method code with example usage: obj.testSparseEye() without return types