def METHOD_NAME(self, inputs, lr, epsilon, decay, gc, dc):
    param, moment, moment_delta, grad = inputs
    moment = np.abs(moment)
    moment_delta = np.abs(moment_delta)
    lr = np.array([lr], dtype=np.float32)
    # Create an indexing array containing values that are lists of indices,
    # which index into grad
    indices = np.random.choice(np.arange(grad.shape[0]),
                               size=np.random.randint(grad.shape[0]), replace=False)
    # Sparsify grad
    grad = grad[indices]
    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(param, moment, moment_delta, indices, grad, lr, decay,
                   ref_using_fp16):
        param_out = np.copy(param)
        moment_out = np.copy(moment)
        moment_delta_out = np.copy(moment_delta)
        for i, index in enumerate(indices):
            param_out[index], moment_out[index], moment_delta_out[
                index] = self.ref_adadelta(param[index], moment[index],
                                           moment_delta[index], grad[i], lr,
                                           epsilon, decay, ref_using_fp16)
        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_using_fp16
        ], ref_sparse)