code: def test_sparse_adadelta_empty(
      self, inputs, lr, epsilon, decay, gc, dc
  ):
      param, moment, moment_delta = inputs
      moment = np.abs(moment)
      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(
          "SparseAdadelta",
          ["param", "moment", "moment_delta", "indices", "grad", "lr"],
          ["param", "moment", "moment_delta"],
          epsilon=epsilon,
          decay=decay,
          device_option=gc,
      )
  
      def ref_sparse_empty(
          param, moment, moment_delta, indices, grad, lr, decay
      ):
          param_out = np.copy(param)
          moment_out = np.copy(moment)
          moment_delta_out = np.copy(moment_delta)
          return (param_out, moment_out, moment_delta_out)
  
      ref_using_fp16_values = [False]
      if gc == hu.gpu_do:
          ref_using_fp16_values.append(True)
  
      for ref_using_fp16 in ref_using_fp16_values:
          moment_i = None
          moment_delta_i = None
          param_i = None
          if ref_using_fp16:
              moment_i = moment.astype(np.float16)
              moment_delta_i = moment_delta.astype(np.float16)
              param_i = param.astype(np.float16)
          else:
              moment_i = moment.astype(np.float32)
              moment_delta_i = moment_delta.astype(np.float32)
              param_i = param.astype(np.float32)
  
          self.assertReferenceChecks(
              gc,
              op,
              [
                  param_i,
                  moment_i,
                  moment_delta_i,
                  indices,
                  grad,
                  lr,
                  decay,
              ],
              ref_sparse_empty,
          )
  
file_path: pytorch/caffe2/python/operator_test/adadelta_test.py
imports: import functools
  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 4 for calling the TestAdadelta obj's underlying member method code with example usage: obj.test_sparse_adadelta_empty(inputs, lr, epsilon, decay, gc, dc) and returns: param_out,  moment_out,  moment_delta_out