code: def recwarn():
      """Return a :class:`WarningsRecorder` instance that records all warnings emitted by test functions.
  
      See http://docs.python.org/library/warnings.html for information
      on warning categories.
      """
      wrec = WarningsRecorder()
      with wrec:
          warnings.simplefilter("default")
          yield wrec
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import inspect
  import re
  import sys
  import warnings
  import six
  import _pytest._code
  from _pytest.deprecated import PYTEST_WARNS_UNKNOWN_KWARGS
  from _pytest.deprecated import WARNS_EXEC
  from _pytest.fixtures import yield_fixture
  from _pytest.outcomes import fail
label_desc: Use image node_id 1 for calling a global function with example usage: recwarn() without return types