code: def test_zero_gradient(self):
      net = core.Net("zero_grad_test")
  
      (
          hidden_prev,
          cell,
          gates,
          seq_lengths,
          timestep,
      ) = net.AddExternalInput("h", "c", "g", "s", "t")
      hidden, cell = net.LSTMUnit(
          [hidden_prev, cell, gates, seq_lengths, timestep],
          ["hidden_t", "cell_t"],
      )
      with self.assertRaises(Exception):
          net.AddGradientOperators([hidden])
      net.ZeroGradient(cell, [])
      net.AddGradientOperators([hidden])
  
imports: from hypothesis import given, settings
  import hypothesis.strategies
  import unittest
  from caffe2.proto import caffe2_pb2
  from caffe2.python import core, test_util, workspace
  from caffe2.python.core import CreateOperator, GradientRegistry, IR
  import numpy
label_desc: Use image node_id 24 for calling the TestGradientCalculation obj's underlying member method code with example usage: obj.test_zero_gradient() without return types