code: def test_available_if_unbound_method():
      # This is a non regression test for:
      # https://github.com/scikit-learn/scikit-learn/issues/20614
      # to make sure that decorated functions can be used as an unbound method,
      # for instance when monkeypatching.
      est = AvailableParameterEstimator()
      AvailableParameterEstimator.available_func(est)
  
      est = AvailableParameterEstimator(available=False)
      with pytest.raises(
          AttributeError,
          match="This 'AvailableParameterEstimator' has no attribute 'available_func'",
      ):
          AvailableParameterEstimator.available_func(est)
  
file_path: scikit-learn/sklearn/utils/tests/test_metaestimators.py
imports: import pickle
  import pytest
  from sklearn.utils.metaestimators import available_if
label_desc: Use image node_id 3 for calling a global function with example usage: test_available_if_unbound_method() without return types