code: def test_cut_subgraph_cond():
      class TestLayer(gluon.HybridBlock):
          def __init__(self):
              super(TestLayer, self).__init__()
  
          def forward(self, data):
              data1 = mx.npx.cond(
                  pred=lambda data: data > 0.5,
                  then_func=lambda data: data * 2,
                  else_func=lambda data: data * 3,
                  inputs=data,
              )
              data2 = mx.npx.cond(
                  pred=lambda data: data > 0.5,
                  then_func=lambda data: data * 2,
                  else_func=lambda data: data * 3,
                  inputs=data1,
              )
              return data2
  
      data = mx.np.random.normal(loc=0, scale=1, size=(1,))
      layer = TestLayer()
      layer.initialize(device=default_device())
      res1 = layer(data)
      with mx.autograd.record():
          res1 = layer(data)
      layer = TestLayer()
      layer.initialize(device=default_device())
      layer.hybridize()
      res2 = layer(data)
      with mx.autograd.record():
          res2 = layer(data)
      assert_almost_equal(
          res1.asnumpy(), res2.asnumpy(), rtol=1e-3, atol=1e-3
      )
  
imports: import copy
  import numpy
  import mxnet
  from mxnet import gluon
  from mxnet.test_utils import *
  from mxnet.base import _as_list
  from collections import defaultdict
  from mxnet.attribute import AttrScope
label_desc: Use image node_id 5 for calling a global function with example usage: test_cut_subgraph_cond() and returns: data2