code: def test_deprecation():
      caller_path = inspect.stack(context=0)[1].filename
      with pytest.deprecated_call() as record:
          deprecation("Deprecated call")
      # Make sure the deprecation pointed to the external function calling this test function
      assert len(record) == 1
      assert record[0].filename == caller_path
  
      with pytest.deprecated_call() as record:
          deprecation("Deprecated call", ["ipywidgets/widgets/tests"])
      # Make sure the deprecation pointed to the external function calling this test function
      assert len(record) == 1
      assert record[0].filename == caller_path
  
      with pytest.deprecated_call() as record:
          deprecation("Deprecated call", "ipywidgets/widgets/tests")
      # Make sure the deprecation pointed to the external function calling this test function
      assert len(record) == 1
      assert record[0].filename == caller_path
  
      with pytest.deprecated_call() as record:
          deprecation("Deprecated call", [])
      # Make sure the deprecation pointed to *this* file
      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 1 for calling a global function with example usage: test_deprecation() without return types