code: def _deprecate_positional_args(func=None, *, version="1.3"):
      """Decorator for methods that issues warnings for positional arguments.
  
      Using the keyword-only argument syntax in pep 3102, arguments after the
      * will issue a warning when passed as a positional argument.
  
      Parameters
      ----------
      func : callable, default=None
          Function to check arguments on.
      version : callable, default="1.3"
          The version when positional arguments will result in error.
      """
  
      def _inner_deprecate_positional_args(f):
          sig = signature(f)
          kwonly_args = []
          all_args = []
  
          for name, param in sig.parameters.items():
              if param.kind == Parameter.POSITIONAL_OR_KEYWORD:
                  all_args.append(name)
              elif param.kind == Parameter.KEYWORD_ONLY:
                  kwonly_args.append(name)
  
          @wraps(f)
          def inner_f(*args, **kwargs):
              extra_args = len(args) - len(all_args)
              if extra_args <= 0:
                  return f(*args, **kwargs)
  
              # extra_args > 0
              args_msg = [
                  "{}={}".format(name, arg)
                  for name, arg in zip(
                      kwonly_args[:extra_args], args[-extra_args:]
                  )
              ]
              args_msg = ", ".join(args_msg)
              warnings.warn(
                  (
                      f"Pass {args_msg} as keyword args. From version "
                      f"{version} passing these as positional arguments "
                      "will result in an error"
                  ),
                  FutureWarning,
              )
              kwargs.update(zip(sig.parameters, args))
              return f(**kwargs)
  
          return inner_f
  
      if func is not None:
          return _inner_deprecate_positional_args(func)
  
      return _inner_deprecate_positional_args
  
imports: import numbers
  import operator
  import warnings
  from contextlib import suppress
  from functools import reduce, wraps
  from inspect import Parameter, isclass, signature
  import joblib
  import numpy
  import scipy.sparse
  from ..None import get_config
  from ..exceptions import DataConversionWarning, NotFittedError, PositiveSpectrumWarning
  from ..utils._array_api import _asarray_with_order, _is_numpy_namespace, get_namespace
  from ..utils.fixes import ComplexWarning
  from ._isfinite import FiniteStatus, cy_isfinite
  from .fixes import _object_dtype_isnan
label_desc: Use image node_id 1 for calling a global function with example usage: _deprecate_positional_args(func) and returns: _inner_deprecate_positional_args, inner_f, _inner_deprecate_positional_args, f, f