code: def test_not_bind_constant():
      def get_net(prefix, data, out_channel):
          weight = relay.var(prefix + "weight")
          bn_gamma = relay.var(prefix + "bn_gamma")
          bn_beta = relay.var(prefix + "bn_beta")
          bn_mmean = relay.var(prefix + "bn_mean")
          bn_mvar = relay.var(prefix + "bn_var")
  
          layer = relay.nn.conv2d(
              data=data,
              weight=weight,
              kernel_size=(3, 3),
              channels=out_channel,
              padding=(1, 1),
          )
          bn_output = relay.nn.batch_norm(
              layer, bn_gamma, bn_beta, bn_mmean, bn_mvar
          )
          out = relay.nn.relu(bn_output[0])
          return relay.Function(relay.analysis.free_vars(out), out)
  
      def get_partitoned_mod(
          mod, params, pattern_table, bind_constants
      ):
          mod["main"] = bind_params_by_name(mod["main"], params)
          remove_bn_pass = tvm.transform.Sequential(
              [
                  transform.InferType(),
                  transform.SimplifyInference(),
                  transform.FoldConstant(),
                  transform.FoldScaleAxis(),
              ]
          )
          composite_partition = tvm.transform.Sequential(
              [
                  remove_bn_pass,
                  transform.MergeComposite(pattern_table),
                  transform.AnnotateTarget("dnnl"),
                  transform.PartitionGraph(
                      bind_constants=bind_constants
                  ),
              ]
          )
  
          with tvm.transform.PassContext(
              opt_level=3, disabled_pass=["AlterOpLayout"]
          ):
              return composite_partition(mod)
  
      data = relay.var(
          "data", relay.TensorType((1, 3, 224, 224), "float32")
      )
      net = get_net("block_", data, 8)
      mod, params = tvm.relay.testing.create_workload(net)
  
      mod = get_partitoned_mod(
          mod, params, get_pattern_table("dnnl"), bind_constants=True
      )
      len(mod["main"].body.args) == 1
  
      mod = get_partitoned_mod(
          mod, params, get_pattern_table("dnnl"), bind_constants=False
      )
      len(mod["main"].body.args) == 3
  
imports: import os
  import sys
  import numpy
  import tvm
  from tvm.relay.backend import te_compiler
  from tvm.relay.backend.runtime import Runtime
  import tvm.relay.testing
  import tvm.relay.op
  from tvm import relay
  from tvm import runtime
  from tvm.relay import transform
  from tvm.relay.testing import byoc
  from tvm.contrib import utils
  from tvm.relay.expr_functor import ExprMutator
  from tvm.relay.op.annotation import compiler_begin, compiler_end
  from tvm.relay.op.contrib.register import get_pattern_table
  from tvm.relay.build_module import bind_params_by_name
label_desc: Use image node_id 25 for calling a global function with example usage: test_not_bind_constant() and returns: relay, composite_partition