code: def __init__(self):
      self.cw = warnings.catch_warnings(record=True)
      self.rec = []
  
file_path: statsmodels/statsmodels/compat/pytest.py
imports: from __future__ import annotations
  import warnings
  from _pytest.recwarn import WarningsChecker
  from pytest import warns
label_desc: Use image node_id 1 to create a new NoWarningsChecker object  with example: obj = NoWarningsChecker()