def METHOD_NAME():
    import torch.nn as nn
    class Net(ModelSpace):
        def __init__(self):
            super().__init__()
            self.repeat = Repeat(
                lambda index: LayerChoice([nn.Identity(), nn.Identity()], label=f'layer{index}'),
                (3, 5), label='rep')
        def forward(self, x):
            return self.module(x)
    net = Net()
    assert net.contains({'rep': 3, 'layer0': 0, 'layer1': 0, 'layer2': 0})
    assert not net.contains({'rep': 4, 'layer0': 0, 'layer1': 0, 'layer2': 0})
    assert net.contains({'rep': 3, 'layer0': 0, 'layer1': 0, 'layer2': 0, 'layer3': 0})