def METHOD_NAME(self, out_channels, num_blocks, stride, dilation,
               expand_ratio):
    """Stack InvertedResidual blocks to build a layer for MobileNetV2.
    Args:
        out_channels (int): out_channels of block.
        num_blocks (int): Number of blocks.
        stride (int): Stride of the first block.
        dilation (int): Dilation of the first block.
        expand_ratio (int): Expand the number of channels of the
            hidden layer in InvertedResidual by this ratio.
    """
    layers = []
    for i in range(num_blocks):
        layers.append(
            InvertedResidual(
                self.in_channels,
                out_channels,
                stride if i == 0 else 1,
                expand_ratio=expand_ratio,
                dilation=dilation if i == 0 else 1,
                conv_cfg=self.conv_cfg,
                norm_cfg=self.norm_cfg,
                act_cfg=self.act_cfg,
                with_cp=self.with_cp))
        self.in_channels = out_channels
    return nn.Sequential(*layers)