code: def preact_group(name, l, block_func, features, count, stride):
      with tfv1.variable_scope(name):
          for i in range(0, count):
              with tfv1.variable_scope("block{}".format(i)):
                  # first block doesn't need activation
                  l = block_func(
                      l,
                      features,
                      stride if i == 0 else 1,
                      "no_preact" if i == 0 else "bnrelu",
                  )
          # end of each group need an extra activation
          l = BNReLU("bnlast", l)
      return l
  
file_path: tensorpack/examples/Saliency/resnet_model.py
imports: import tensorflow
  from tensorpack import tfv1
  from tensorpack.models import BatchNorm, BNReLU, Conv2D, FullyConnected, GlobalAvgPooling, MaxPooling
  from tensorpack.tfutils.argscope import argscope, get_arg_scope
label_desc: Use image node_id 6 for calling a global function with example usage: preact_group(name, l, block_func, features, count, stride) and returns: l