code: def pytest_warning_messages(warnings):
      """Get the warning messages for captured warnings"""
      return [str(w.message) for w in warnings.list]
  
imports: import contextlib
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: pytest_warning_messages(warnings) and returns: unknown