code: def conv_block(
      x_in: tf.Tensor,
      filters: Tuple[int, int],
      kernel_size: Union[int, list, Tuple[int]],
      stage: int,
      block: str,
      strides: Tuple[int, int] = (2, 2),
      l2_regularisation: bool = True,
  ) -> tf.Tensor:
      """
      Conv block in ResNet with a parameterised skip connection to reduce the width and height
      controlled by the strides.
  
      Parameters
      ----------
      x_in
          Input Tensor.
      filters
          Number of filters for each of the 2 conv layers.
      kernel_size
          Kernel size for the conv layers.
      stage
          Stage of the block in the ResNet.
      block
          Block within a stage in the ResNet.
      strides
          Stride size applied to reduce the image size.
      l2_regularisation
          Whether to apply L2 regularisation.
  
      Returns
      -------
      Output Tensor of the conv block.
      """
      # name of block
      conv_name_base = "res" + str(stage) + "_" + block + "_branch"
      bn_name_base = "bn" + str(stage) + "_" + block + "_branch"
  
      filters_1, filters_2 = filters
      bn_axis = 3  # channels last format
  
      x = Conv2D(
          filters_1,
          kernel_size,
          strides=strides,
          padding="same",
          use_bias=False,
          kernel_initializer="he_normal",
          kernel_regularizer=l2_regulariser(l2_regularisation),
          name=conv_name_base + "2a",
      )(x_in)
      x = BatchNormalization(
          axis=bn_axis,
          momentum=BATCH_NORM_DECAY,
          epsilon=BATCH_NORM_EPSILON,
          name=bn_name_base + "2a",
      )(x)
      x = Activation("relu")(x)
  
      x = Conv2D(
          filters_2,
          kernel_size,
          padding="same",
          use_bias=False,
          kernel_initializer="he_normal",
          kernel_regularizer=l2_regulariser(l2_regularisation),
          name=conv_name_base + "2b",
      )(x)
      x = BatchNormalization(
          axis=bn_axis,
          momentum=BATCH_NORM_DECAY,
          epsilon=BATCH_NORM_EPSILON,
          name=bn_name_base + "2b",
      )(x)
  
      shortcut = Conv2D(
          filters_2,
          (1, 1),
          strides=strides,
          use_bias=False,
          kernel_initializer="he_normal",
          kernel_regularizer=l2_regulariser(l2_regularisation),
          name=conv_name_base + "1",
      )(x_in)
      shortcut = BatchNormalization(
          axis=bn_axis,
          momentum=BATCH_NORM_DECAY,
          epsilon=BATCH_NORM_EPSILON,
          name=bn_name_base + "1",
      )(shortcut)
  
      x = Add()([x, shortcut])
      x = Activation("relu")(x)
      return x
  
imports: import argparse
  import numpy
  import os
  from pathlib import Path
  import tensorflow
  from tensorflow.keras.callbacks import Callback, ModelCheckpoint
  from tensorflow.keras.initializers import RandomNormal
  from tensorflow.keras.layers import Activation, Add, BatchNormalization, Conv2D, Dense, Input, ZeroPadding2D
  from tensorflow.keras.models import Model
  from tensorflow.keras.optimizers import SGD
  from tensorflow.keras.preprocessing.image import ImageDataGenerator
  from tensorflow.keras.regularizers import l2
  from typing import Callable, Tuple, Union
label_desc: Use image node_id 3 for calling a global function with example usage: conv_block(x_in, filters, kernel_size, stage, block, strides, l2_regularisation) and returns: x