code: def assert_warning_in_record(warning_message, warn_record):
      """Assert that a warning message is in the records."""
      all_messages = [str(w.message) for w in warn_record]
      assert warning_message in all_messages
  
file_path: mne-python/mne/io/fieldtrip/tests/helpers.py
imports: import os
  from functools import partial
  import numpy
  import mne
  from mne.utils import object_diff
label_desc: Use image node_id 12 for calling a global function with example usage: assert_warning_in_record(warning_message, warn_record) without return types