Try taking a look at DenseNet implementations for inspiration (my implementation: https://github.com/kevinzakka/densenet/blob/master/model.py 11).
Here’s a small snippet that uses a for loop to create multiple user-defined DenseBlocks (which consists in a sequence of BatchNorm - ReLU - Conv). You need to have an equation that calculates the output channels so that you can properly chain the blocks together.
blocks = []
for i in range(num_blocks):
    dblock = DenseBlock(
        num_layers_dense, out_channels, 
        growth_rate, bottleneck, p
    )
    blocks.append(dblock)
    out_channels = dblock.out_channels

self.block = nn.Sequential(*blocks)