code: def test_deprecation_instance_method_decorator() -> None:
      deprecated_version = "1.1.0"
      removed_version = "3.0.0"
      decorator_deprecation = _deprecated.deprecated_func(
          deprecated_version, removed_version
      )
      assert callable(decorator_deprecation)
  
      decorated_method = decorator_deprecation(_Sample._method)
      assert decorated_method.__name__ == _Sample._method.__name__
      assert (
          decorated_method.__doc__ == _Sample._method_expected.__doc__
      )
  
      with pytest.warns(FutureWarning):
          decorated_method(None)
  
file_path: optuna/tests/test_deprecated.py
imports: from typing import Any
  from typing import Optional
  import pytest
  from optuna import _deprecated
label_desc: Use image node_id 3 for calling a global function with example usage: test_deprecation_instance_method_decorator() without return types