def is_block(modules):
        """Check if is ResNet building block."""
        if isinstance(modules, (BasicBlock, Bottleneck)):
            return True
        return False
Check if is ResNet building block.
mmpose/tests/test_models/test_backbones/test_resnet.py