code: def check_for_warnings(warn_printed, w_msg):
      selected_w = [
          w for w in warn_printed if issubclass(w.category, UserWarning)
      ]
      assert len(selected_w) >= 1
      msg = [str(m.message) for m in selected_w]
      npt.assert_equal(w_msg in msg, True)
  
file_path: dipy/dipy/testing/__init__.py
imports: import operator
  from functools import partial
  from os.path import dirname, abspath, join
  from numpy.testing import assert_array_equal
  import numpy
  import numpy.testing
  import scipy
  from packaging.version import Version
  import warnings
label_desc: Use image node_id 4 for calling a global function with example usage: check_for_warnings(warn_printed, w_msg) without return types