code: def vgg_layer(
      inputs,
      nout,
      kernel_size=3,
      activation=tf.nn.leaky_relu,
      padding="SAME",
      is_training=True,
      has_batchnorm=False,
      scope=None,
  ):
      """A layer of VGG network with batch norm.
  
      Args:
        inputs: image tensor
        nout: number of output channels
        kernel_size: size of the kernel
        activation: activation function
        padding: padding of the image
        is_training: whether it is training mode or not
        has_batchnorm: whether batchnorm is applied or not
        scope: variable scope of the op
      Returns:
        net: output of layer
      """
      with tf.variable_scope(scope):
          net = tfl.conv2d(
              inputs,
              nout,
              kernel_size=kernel_size,
              padding=padding,
              activation=None,
              name="conv",
          )
          if has_batchnorm:
              net = tfl.batch_normalization(
                  net, training=is_training, name="bn"
              )
          net = activation(net)
      return net
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.layers import common_layers
  from tensor2tensor.utils import contrib
  import tensorflow.compat.v1
  from tensorflow.python.ops import summary_op_util
label_desc: Use image node_id 12 for calling a global function with example usage: vgg_layer(inputs, nout, kernel_size, activation, padding, is_training, has_batchnorm, scope) and returns: net