code: def block2(
      x,
      filters,
      kernel_size=3,
      stride=1,
      conv_shortcut=False,
      name=None,
  ):
      """A residual block.
  
      Args:
          x: input tensor.
          filters: integer, filters of the bottleneck layer.
          kernel_size: default 3, kernel size of the bottleneck layer.
          stride: default 1, stride of the first layer.
          conv_shortcut: default False, use convolution shortcut if True,
              otherwise identity shortcut.
          name: string, block label.
  
      Returns:
          Output tensor for the residual block.
      """
      bn_axis = (
          3
          if keras.backend.image_data_format() == "channels_last"
          else 1
      )
  
      preact = layers.BatchNormalization(
          axis=bn_axis, epsilon=1.001e-5, name=f"{name}_preact_bn"
      )(x)
  
      preact = layers.Activation("relu", name=f"{name}_preact_relu")(
          preact
      )
  
      if conv_shortcut is True:
          shortcut = layers.Conv2D(
              4 * filters, 1, strides=stride, name=f"{name}_0_conv"
          )(preact)
  
      else:
          shortcut = (
              layers.MaxPooling2D(1, strides=stride)(x)
              if stride > 1
              else x
          )
  
      x = layers.Conv2D(
          filters, 1, strides=1, use_bias=False, name=f"{name}_1_conv"
      )(preact)
  
      x = layers.BatchNormalization(
          axis=bn_axis, epsilon=1.001e-5, name=f"{name}_1_bn"
      )(x)
  
      x = layers.Activation("relu", name=f"{name}_1_relu")(x)
  
      x = layers.ZeroPadding2D(
          padding=((1, 1), (1, 1)), name=f"{name}_2_pad"
      )(x)
      x = layers.Conv2D(
          filters,
          kernel_size,
          strides=stride,
          use_bias=False,
          name=f"{name}_2_conv",
      )(x)
  
      x = layers.BatchNormalization(
          axis=bn_axis, epsilon=1.001e-5, name=f"{name}_2_bn"
      )(x)
  
      x = layers.Activation("relu", name=f"{name}_2_relu")(x)
  
      x = layers.Conv2D(4 * filters, 1, name=f"{name}_3_conv")(x)
      x = layers.Add(name=f"{name}_out")([shortcut, x])
      return x
  
file_path: keras-tuner/keras_tuner/applications/resnet.py
imports: from keras_tuner.api_export import keras_tuner_export
  from keras_tuner.backend import keras
  from keras_tuner.backend import ops
  from keras_tuner.backend.keras import layers
  from keras_tuner.engine import hypermodel
label_desc: Use image node_id 3 for calling a global function with example usage: block2(x, filters, kernel_size, stride, conv_shortcut, name) and returns: x