code: def _se_block(inputs, filters, prefix, se_ratio=1 / 4.0):
      # [batch, height, width, channel] -> [batch, channel]
      x = layers.GlobalAveragePooling2D(
          name=prefix + "squeeze_excite/AvgPool"
      )(inputs)
  
      # Target shape. Tuple of integers, does not include the samples dimension (batch size).
      # [batch, channel] -> [batch, 1, 1, channel]
      x = layers.Reshape((1, 1, filters))(x)
  
      # fc1
      x = layers.Conv2D(
          filters=_make_divisible(filters * se_ratio),
          kernel_size=1,
          padding="same",
          name=prefix + "squeeze_excite/Conv",
      )(x)
      x = layers.ReLU(name=prefix + "squeeze_excite/Relu")(x)
  
      # fc2
      x = layers.Conv2D(
          filters=filters,
          kernel_size=1,
          padding="same",
          name=prefix + "squeeze_excite/Conv_1",
      )(x)
      x = HardSigmoid(name=prefix + "squeeze_excite/HardSigmoid")(x)
  
      x = layers.Multiply(name=prefix + "squeeze_excite/Mul")(
          [inputs, x]
      )
      return x
  
file_path: deep-learning-for-image-processing/tensorflow_classification/Test6_mobilenet/model_v3.py
imports: from typing import Union
  from functools import partial
  from tensorflow.keras import layers, Model
label_desc: Use image node_id 3 for calling a global function with example usage: _se_block(inputs, filters, prefix, se_ratio) and returns: x