code: def test_deprecate_positional_args_warns_for_function():
      @_deprecate_positional_args
      def f1(a, b, *, c=1, d=1):
          pass
  
      with pytest.warns(
          FutureWarning, match=r"Pass c=3 as keyword args"
      ):
          f1(1, 2, 3)
  
      with pytest.warns(
          FutureWarning, match=r"Pass c=3, d=4 as keyword args"
      ):
          f1(1, 2, 3, 4)
  
      @_deprecate_positional_args
      def f2(a=1, *, b=1, c=1, d=1):
          pass
  
      with pytest.warns(
          FutureWarning, match=r"Pass b=2 as keyword args"
      ):
          f2(1, 2)
  
      # The * is place before a keyword only argument without a default value
      @_deprecate_positional_args
      def f3(a, *, b, c=1, d=1):
          pass
  
      with pytest.warns(
          FutureWarning, match=r"Pass b=2 as keyword args"
      ):
          f3(1, 2)
  
imports: from collections import Counter, OrderedDict
  import numpy
  import pytest
  from sklearn.cluster import KMeans
  from sklearn.neighbors import NearestNeighbors
  from sklearn.neighbors._base import KNeighborsMixin
  from sklearn.utils._testing import assert_array_equal
  from imblearn.utils import check_neighbors_object, check_sampling_strategy, check_target_type
  from imblearn.utils._validation import ArraysTransformer, _deprecate_positional_args, _is_neighbors_object
  from imblearn.utils.testing import _CustomNearestNeighbors
label_desc: Use image node_id 20 for calling a global function with example usage: test_deprecate_positional_args_warns_for_function() without return types