code: def transition_block(x, reduction, name):
      """A transition block.
  
      Args:
          x: input tensor.
          reduction: float, compression rate at transition layers.
          name: string, block label.
  
      Returns:
          Output tensor for the block.
      """
      bn_axis = (
          3 if backend.image_data_format() == "channels_last" else 1
      )
      x = layers.BatchNormalization(
          axis=bn_axis, epsilon=1.001e-5, name=name + "_bn"
      )(x)
      x = layers.Activation("relu", name=name + "_relu")(x)
      x = layers.Conv2D(
          int(x.shape[bn_axis] * reduction),
          1,
          use_bias=False,
          name=name + "_conv",
      )(x)
      x = layers.AveragePooling2D(2, strides=2, name=name + "_pool")(x)
      return x
  
file_path: keras/keras/applications/densenet.py
imports: from keras import backend
  from keras import layers
  from keras.api_export import keras_export
  from keras.applications import imagenet_utils
  from keras.models import Functional
  from keras.ops import operation_utils
  from keras.utils import file_utils
label_desc: Use image node_id 2 for calling a global function with example usage: transition_block(x, reduction, name) and returns: x