code: def mb_conv_block(
      inputs,
      block_args,
      activation,
      drop_rate=None,
      prefix="",
  ):
      """Mobile Inverted Residual Bottleneck."""
  
      has_se = (block_args.se_ratio is not None) and (
          0 < block_args.se_ratio <= 1
      )
      bn_axis = (
          3 if backend.image_data_format() == "channels_last" else 1
      )
  
      # workaround over non working dropout with None in noise_shape in tf.keras
      Dropout = get_dropout(
          backend=backend,
          layers=layers,
          models=models,
          utils=keras_utils,
      )
  
      # Expansion phase
      filters = block_args.input_filters * block_args.expand_ratio
      if block_args.expand_ratio != 1:
          x = layers.Conv2D(
              filters,
              1,
              padding="same",
              use_bias=False,
              kernel_initializer=CONV_KERNEL_INITIALIZER,
              name=prefix + "expand_conv",
          )(inputs)
          x = layers.BatchNormalization(
              axis=bn_axis, name=prefix + "expand_bn"
          )(x)
          x = layers.Activation(
              activation, name=prefix + "expand_activation"
          )(x)
      else:
          x = inputs
  
      # Depthwise Convolution
      x = layers.DepthwiseConv2D(
          block_args.kernel_size,
          strides=block_args.strides,
          padding="same",
          use_bias=False,
          depthwise_initializer=CONV_KERNEL_INITIALIZER,
          name=prefix + "dwconv",
      )(x)
      x = layers.BatchNormalization(axis=bn_axis, name=prefix + "bn")(x)
      x = layers.Activation(activation, name=prefix + "activation")(x)
  
      # Squeeze and Excitation phase
      if has_se:
          num_reduced_filters = max(
              1, int(block_args.input_filters * block_args.se_ratio)
          )
          se_tensor = layers.GlobalAveragePooling2D(
              name=prefix + "se_squeeze"
          )(x)
  
          target_shape = (
              (1, 1, filters)
              if backend.image_data_format() == "channels_last"
              else (filters, 1, 1)
          )
          se_tensor = layers.Reshape(
              target_shape, name=prefix + "se_reshape"
          )(se_tensor)
          se_tensor = layers.Conv2D(
              num_reduced_filters,
              1,
              activation=activation,
              padding="same",
              use_bias=True,
              kernel_initializer=CONV_KERNEL_INITIALIZER,
              name=prefix + "se_reduce",
          )(se_tensor)
          se_tensor = layers.Conv2D(
              filters,
              1,
              activation="sigmoid",
              padding="same",
              use_bias=True,
              kernel_initializer=CONV_KERNEL_INITIALIZER,
              name=prefix + "se_expand",
          )(se_tensor)
          if backend.backend() == "theano":
              # For the Theano backend, we have to explicitly make
              # the excitation weights broadcastable.
              pattern = (
                  [True, True, True, False]
                  if backend.image_data_format() == "channels_last"
                  else [True, False, True, True]
              )
              se_tensor = layers.Lambda(
                  lambda x: backend.pattern_broadcast(x, pattern),
                  name=prefix + "se_broadcast",
              )(se_tensor)
          x = layers.multiply([x, se_tensor], name=prefix + "se_excite")
  
      # Output phase
      x = layers.Conv2D(
          block_args.output_filters,
          1,
          padding="same",
          use_bias=False,
          kernel_initializer=CONV_KERNEL_INITIALIZER,
          name=prefix + "project_conv",
      )(x)
      x = layers.BatchNormalization(
          axis=bn_axis, name=prefix + "project_bn"
      )(x)
      if (
          block_args.id_skip
          and all(s == 1 for s in block_args.strides)
          and block_args.input_filters == block_args.output_filters
      ):
          if drop_rate and (drop_rate > 0):
              x = Dropout(
                  drop_rate,
                  noise_shape=(None, 1, 1, 1),
                  name=prefix + "drop",
              )(x)
          x = layers.add([x, inputs], name=prefix + "add")
  
      return x
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import math
  import string
  import collections
  from six.moves import xrange
  from keras_applications.imagenet_utils import _obtain_input_shape
  from keras_applications.imagenet_utils import preprocess_input
  from .None import get_submodules_from_kwargs
  from .weights import IMAGENET_WEIGHTS_PATH, IMAGENET_WEIGHTS_HASHES, NS_WEIGHTS_HASHES, NS_WEIGHTS_PATH
label_desc: Use image node_id 6 for calling a global function with example usage: mb_conv_block(inputs, block_args, activation, drop_rate, prefix) and returns: x