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