This code snippet seems to be similar to the _make_layer method used in the resnet creation.
It’s accepting a few arguments, e.g. the desired block to use in these layers, and creates an nn.Sequential container out of these arguments.
In a torchvision resnet, you could print one of these blocks e.g. via print(model.layer4) to see which submodules were created.