def _find_unknown_dim_warning(raised_warnings: pytest.WarningsRecorder) -> bool:
        """Find if pytest catches any warning message about the unknown dim warning."""
        for raised_warning in raised_warnings:
            if raised_warning.message.args[0].startswith(
                "Some dimensions in the input shape are unknown, hence they are set to flexible ranges"
            ):
                return True
        return False
Find if pytest catches any warning message about the unknown dim warning.
coremltools/converters/mil/test_inputs_outputs_shape.py