code: def test_deprecation_nested2():
      def level2():
          deprecation("test message", [])
  
      def level1():
          level2()
  
      with pytest.warns(DeprecationWarning) as record:
          call_method(level1)
  
      assert len(record) == 1
      assert record[0].filename == __file__
  
file_path: catboost/contrib/python/ipywidgets/py3/ipywidgets/widgets/tests/test_utils.py
imports: import inspect
  import pytest
  from ..utils import deprecation
  from .utils import call_method
label_desc: Use image node_id 5 for calling a global function with example usage: test_deprecation_nested2() without return types