docstr: Find if pytest catches any warning message about the unknown dim warning.
docstr_tok: ["Find","if","pytest","catches","any","warning","message","about","the","unknown","dim","warning","."]
code: 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
  
imports: import itertools
  import os
  import tempfile
  import numpy
  import PIL.Image
  import pytest
  import coremltools
  from coremltools._deps import _HAS_TF_2, _HAS_TORCH, MSG_TF2_NOT_FOUND, MSG_TORCH_NOT_FOUND
  from coremltools.converters.mil import Builder
  from coremltools.converters.mil.testing_reqs import backends, compute_units
label_desc: Use image node_id 3 for calling the TestFlexibleInputShapesTF obj's underlying member method code with example usage: obj._find_unknown_dim_warning(raised_warnings) and returns: False, True