code: def projection_block(
      x: tf.Tensor,
      n_filters: int,
      strides: Uninon[int, tuple[int, int]] = (2, 2),
      n: int = 2,
  ) -> tf.Tensor:
      """Construct a Bottleneck Residual Block with Projection Shortcut
      Increase the number of filters by 2X (or 4X on first stage)
      x        : input into the block
      n_filters: number of filters
      strides  : whether the first convolution is strided
      n        : multiplier for number of filters out
      """
      # Construct the projection shortcut
      # Increase filters by 2X (or 4X) to match shape when added to output of block
      shortcut = Conv2D(
          n_filters * n,
          (1, 1),
          strides=strides,
          use_bias=False,
          kernel_regularizer=l2(WEIGHT_DECAY),
      )(x)
  
      ## Construct the 1x1, 3x3, 1x1 convolution block
  
      # Dimensionality reduction
      x = BatchNormalization()(x)
      x = ReLU()(x)
      x = Conv2D(
          n_filters,
          (1, 1),
          strides=(1, 1),
          use_bias=False,
          kernel_regularizer=l2(WEIGHT_DECAY),
      )(x)
  
      # Bottleneck layer - feature pooling when strides=(2, 2)
      x = BatchNormalization()(x)
      x = ReLU()(x)
      x = Conv2D(
          n_filters,
          (3, 3),
          strides=strides,
          padding="same",
          use_bias=False,
          kernel_regularizer=l2(WEIGHT_DECAY),
      )(x)
  
      # Dimensionality restoration - increase the number of filters by 2X (or 4X)
      x = BatchNormalization()(x)
      x = ReLU()(x)
      x = Conv2D(
          n_filters * n,
          (1, 1),
          strides=(1, 1),
          use_bias=False,
          kernel_regularizer=l2(WEIGHT_DECAY),
      )(x)
  
      # Add the projection shortcut to the output of the residual block
      x = Add()([shortcut, x])
      return x
  
file_path: neural-structured-learning/research/third_party/denoised_smoothing/models/resnet20.py
imports: from typing import Union
  import tensorflow
  from tensorflow.keras import Model, Input
  from tensorflow.keras.layers import Conv2D, Dense, BatchNormalization, ReLU, Add, AveragePooling2D, GlobalAvgPool2D
  from tensorflow.keras.regularizers import l2
label_desc: Use image node_id 5 for calling a global function with example usage: projection_block(x, n_filters, strides, n) and returns: x