code: def test_div_legacy_grad(
      self,
      n: int,
      m: int,
      broadcast: bool,
      allow_broadcast_fastpath: bool,
      gc,
      dc,
  ):
      op = core.CreateOperator(
          "DivGradient",
          ["B", "C", "dC"],
          ["dA", "dB"],
          allow_broadcast_fastpath=allow_broadcast_fastpath,
      )
  
      def div_grad_ref(B, C, dC):
          dA = dC / B
          dB = -dC * C / B
          if broadcast:
              dB = np.sum(dB, axis=0)
          return [dA, dB]
  
      if broadcast:
          B = np.random.rand(m).astype(np.float32) + 1.0
      else:
          B = np.random.rand(n, m).astype(np.float32) + 1.0
      C = np.random.randn(n, m).astype(np.float32)
      dC = np.random.randn(n, m).astype(np.float32)
      inputs = [B, C, dC]
      self.assertReferenceChecks(
          device_option=gc,
          op=op,
          inputs=inputs,
          reference=div_grad_ref,
      )
      self.assertDeviceChecks(dc, op, inputs, [0, 1])
  
imports: from caffe2.python import core, workspace
  from hypothesis import given, assume, settings
  import caffe2.python.hypothesis_test_util
  import hypothesis.strategies
  import numpy
  import unittest
label_desc: Use image node_id 30 for calling the TestElementwiseOps obj's underlying member method code with example usage: obj.test_div_legacy_grad(n, m, broadcast, allow_broadcast_fastpath, gc, dc) and returns: list