def METHOD_NAME(self,
                block,
                planes,
                blocks,
                shortcut_type,
                cardinality,
                stride=1,
                name=None):
    downsample = None
    if stride != 1 or self.inplanes != planes * block.expansion:
        if shortcut_type == 'A':
            downsample = partial(self._downsample_basic_block,
                                 planes=planes * block.expansion,
                                 stride=stride)
        else:
            downsample = ConvBNLayer(
                self.inplanes,
                planes * block.expansion,
                1,
                stride=stride,
                bias_attr=False,
                name=name+'downsample'
            )
    layers = []
    layers.append(
        block(self.inplanes, planes, cardinality, stride, downsample, name=name+'_downsample'))
    self.inplanes = planes * block.expansion
    for i in range(1, blocks):
        layers.append(block(self.inplanes, planes,
                      cardinality, name=name+'_res_block'+str(i)))
    return paddle.nn.Sequential(*layers)