code: def fail_on_warning():
      with warnings.catch_warnings():
          warnings.simplefilter("error")
          yield
  
file_path: pymc/tests/conftest.py
imports: import warnings
  import numpy
  import pytensor
  import pytest
label_desc: Use image node_id 5 for calling a global function with example usage: fail_on_warning() without return types