class_docstr: Decorator that issues a warning when using positional args that should be
  keyword args. Mimics sklearn's `_deprecate_positional_args` with added
  functionality.
  
  For any class that derives from `cuml.Base`, this decorator will be
  automatically added to `__init__`. In this scenario, its assumed that all
  arguments are keyword arguments. To override the functionality this
  decorator can be manually added, allowing positional arguments if
  necessary.
  
  Parameters
  ----------
  version : str
      This version will be specified in the warning message as the
      version when positional arguments will be removed
class_docstr_tok: ["Decorator","that","issues","a","warning","when","using","positional","args","that","should","be","keyword","args",".","Mimics","sklearn","'s","`","_deprecate_positional_args","`","with","added","functionality",".","For","any","class","that","derives","from","`","cuml.Base","`",",","this","decorator","will","be","automatically","added","to","`","__init__","`",".","In","this","scenario",",","its","assumed","that","all","arguments","are","keyword","arguments",".","To","override","the","functionality","this","decorator","can","be","manually","added",",","allowing","positional","arguments","if","necessary",".","Parameters","--","--","--","--","--","version",":","str","This","version","will","be","specified","in","the","warning","message","as","the","version","when","positional","arguments","will","be","removed"]
code: def __call__(self, func: _DecoratorType) -> _DecoratorType:
      sig = inspect.signature(func)
      kwonly_args = []
      all_args = []
  
      # Store all the positional and keyword only args
      for name, param in sig.parameters.items():
          if param.kind == inspect.Parameter.POSITIONAL_OR_KEYWORD:
              all_args.append(name)
          elif param.kind == inspect.Parameter.KEYWORD_ONLY:
              kwonly_args.append(name)
  
      @wraps_typed(func)
      def inner_f(*args, **kwargs):
          extra_args = len(args) - len(all_args)
          if extra_args > 0:
              # ignore first 'self' argument for instance methods
              args_msg = [
                  "{}={}".format(name, arg)
                  for name, arg in zip(
                      kwonly_args[:extra_args], args[-extra_args:]
                  )
              ]
              warnings.warn(
                  "Pass {} as keyword args. From version {}, "
                  "passing these as positional arguments will "
                  "result in an error".format(
                      ", ".join(args_msg), self._version
                  ),
                  FutureWarning,
                  stacklevel=2,
              )
  
          # Convert all positional args to keyword
          kwargs.update(
              {k: arg for k, arg in zip(sig.parameters, args)}
          )
  
          return func(**kwargs)
  
      # Set this flag to prevent auto adding this decorator twice
      inner_f.__dict__[_deprecate_pos_args.FLAG_NAME] = True
  
      return inner_f
  
imports: import contextlib
  import functools
  import inspect
  import typing
  import warnings
  from cuml.internals import input_utils
  from cuml.internals.api_context_managers import BaseReturnAnyCM
  from cuml.internals.api_context_managers import BaseReturnArrayCM
  from cuml.internals.api_context_managers import BaseReturnGenericCM
  from cuml.internals.api_context_managers import BaseReturnSparseArrayCM
  from cuml.internals.api_context_managers import InternalAPIContextBase
  from cuml.internals.api_context_managers import ReturnAnyCM
  from cuml.internals.api_context_managers import ReturnArrayCM
  from cuml.internals.api_context_managers import ReturnGenericCM
  from cuml.internals.api_context_managers import ReturnSparseArrayCM
  from cuml.internals.api_context_managers import set_api_output_dtype
  from cuml.internals.api_context_managers import set_api_output_type
  from cuml.internals.constants import CUML_WRAPPED_FLAG
  from cuml.internals.global_settings import GlobalSettings
  from cuml.internals.memory_utils import using_output_type
  from cuml.internals.type_utils import _DecoratorType, wraps_typed
  from cuml.internals import logger
label_desc: Use image node_id 2 for calling the _deprecate_pos_args obj's underlying member method code with example usage: obj.__call__(func) and returns: inner_f, func