code: def test_sparse_wngrad_empty(
      self, inputs, seq_b, lr, epsilon, gc, dc
  ):
      param = inputs[0]
      seq_b = np.array(
          [
              seq_b,
          ],
          dtype=np.float32,
      )
      lr = np.array([lr], dtype=np.float32)
  
      grad = np.empty(shape=(0,) + param.shape[1:], dtype=np.float32)
      indices = np.empty(shape=(0,), dtype=np.int64)
  
      hypothesis.note("indices.shape: %s" % str(indices.shape))
  
      op = core.CreateOperator(
          "SparseWngrad",
          ["param", "seq_b", "indices", "grad", "lr"],
          ["param", "seq_b"],
          epsilon=epsilon,
          device_option=gc,
      )
  
      def ref_sparse(param, seq_b, indices, grad, lr):
          param_out = np.copy(param)
          seq_b_out = np.copy(seq_b)
          return (param_out, seq_b_out)
  
      print("test_sparse_adagrad_empty with full precision embedding")
      seq_b_i = seq_b.astype(np.float32)
      param_i = param.astype(np.float32)
  
      self.assertReferenceChecks(
          gc, op, [param_i, seq_b_i, indices, grad, lr], ref_sparse
      )
  
file_path: pytorch/caffe2/python/operator_test/wngrad_test.py
imports: import functools
  import logging
  import hypothesis
  from hypothesis import given, settings, HealthCheck
  import hypothesis.strategies
  import numpy
  from caffe2.python import core
  import caffe2.python.hypothesis_test_util
  import caffe2.python.serialized_test.serialized_test_util
label_desc: Use image node_id 5 for calling the TestWngrad obj's underlying member method code with example usage: obj.test_sparse_wngrad_empty(inputs, seq_b, lr, epsilon, gc, dc) and returns: param_out,  seq_b_out