def test_invalid_max_depth():
    """Test that invalid value for max_depth raises an error."""
    model = LightningModule()

    with pytest.raises(ValueError, match="max_depth` can be .* got temp"):
        ModelSummary(model, max_depth="temp")
Test that invalid value for max_depth raises an error.
tests/tests_pytorch/utilities/test_model_summary.py