code: def testStopGradientWithMultiUseOperators(self):
      operators = [
          CreateOperator("Direct", "in", "hidden"),
          CreateOperator("Direct", "hidden", "hidden2"),
          CreateOperator("StopGradient", "hidden", "hidden3"),
          CreateOperator("Direct", ["hidden2", "hidden3"], "out"),
      ]
      desired_grad_operators = [
          CreateOperator(
              "DirectGradient",
              "out_grad",
              ["hidden2_grad", "hidden3_grad"],
          ),
          CreateOperator(
              "DirectGradient", "hidden2_grad", "hidden_grad"
          ),
          CreateOperator("DirectGradient", "hidden_grad", "in_grad"),
      ]
      gradients, grad_map = GradientRegistry.GetBackwardPass(
          operators, {"out": "out_grad"}
      )
      self.assertOperatorListEqual(gradients, desired_grad_operators)
      self.assertEqual(
          grad_map,
          {
              "out": "out_grad",
              "hidden2": "hidden2_grad",
              "hidden3": "hidden3_grad",
              "hidden": "hidden_grad",
              "in": "in_grad",
          },
      )
  
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 23 for calling the TestGradientCalculation obj's underlying member method code with example usage: obj.testStopGradientWithMultiUseOperators() without return types