code: def resnet_bottleneck(l, ch_out, stride):
      shortcut = l
      if cfg.BACKBONE.STRIDE_1X1:
          if stride == 2:
              l = l[:, :, :-1, :-1]
          l = Conv2D("conv1", l, ch_out, 1, strides=stride)
          l = Conv2D("conv2", l, ch_out, 3, strides=1)
      else:
          l = Conv2D("conv1", l, ch_out, 1, strides=1)
          if stride == 2:
              l = tf.pad(
                  l,
                  [
                      [0, 0],
                      [0, 0],
                      maybe_reverse_pad(0, 1),
                      maybe_reverse_pad(0, 1),
                  ],
              )
              l = Conv2D(
                  "conv2", l, ch_out, 3, strides=2, padding="VALID"
              )
          else:
              l = Conv2D("conv2", l, ch_out, 3, strides=stride)
      if cfg.BACKBONE.NORM != "None":
          l = Conv2D(
              "conv3",
              l,
              ch_out * 4,
              1,
              activation=get_norm(zero_init=True),
          )
      else:
          l = Conv2D(
              "conv3",
              l,
              ch_out * 4,
              1,
              activation=tf.identity,
              kernel_initializer=tf.constant_initializer(),
          )
      ret = l + resnet_shortcut(
          shortcut,
          ch_out * 4,
          stride,
          activation=get_norm(zero_init=False),
      )
      return tf.nn.relu(ret, name="output")
  
imports: import numpy
  import tensorflow
  from contextlib import ExitStack, contextmanager
  from tensorpack import tfv1
  from tensorpack.models import BatchNorm, Conv2D, MaxPooling, layer_register
  from tensorpack.tfutils import argscope
  from tensorpack.tfutils.scope_utils import auto_reuse_variable_scope
  from tensorpack.tfutils.varreplace import custom_getter_scope, freeze_variables
  from config import config
label_desc: Use image node_id 8 for calling a global function with example usage: resnet_bottleneck(l, ch_out, stride) and returns: tf