code: def test_deprecated():
      with pytest.warns(DeprecationWarning, match="qwerty"):
          MockClass1()
  
      with pytest.warns(DeprecationWarning, match="mockclass2_method"):
          MockClass2().method()
  
      with pytest.warns(DeprecationWarning, match="deprecated"):
          MockClass3()
  
      with pytest.warns(DeprecationWarning):
          val = mock_function()
          assert val == 10
  
file_path: pyts/pyts/utils/tests/test_deprecation.py
imports: import pytest
  from pyts.utils.deprecation import _is_deprecated
  from pyts.utils.deprecation import deprecated
label_desc: Use image node_id 2 for calling a global function with example usage: test_deprecated() without return types